Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
9.0
-
None
-
None
Description
Requesting code completion after "std::" causes NullPointerException.
The issue can be reproduce by:
- Creating a clean C++ project.
- Wait for parse
- In project settings change project's c++ standard option to C++17
- Right click on project -> Code Assistance -> Reparse Project
- Type std:: in a source file
Version used: 9.0 rc1 aka 302-on-20180517
Exception:
SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.spi.editor.completion.support.AsyncCompletionTask
java.lang.NullPointerException
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery$Context.findAutoOrDecltypeAutoType(CsmCompletionQuery.java:1456)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery$Context.findAutoOrDecltypeAutoType(CsmCompletionQuery.java:1427)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery$Context.resolveItem(CsmCompletionQuery.java:2748)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery$Context.resolveExp(CsmCompletionQuery.java:1980)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery$Context.resolveType(CsmCompletionQuery.java:1695)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery$Context.resolveType(CsmCompletionQuery.java:1684)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery$Context.resolveItem(CsmCompletionQuery.java:2700)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery$Context.resolveExp(CsmCompletionQuery.java:1980)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.getResolvedContext(CsmCompletionQuery.java:884)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.performQueryTask(CsmCompletionQuery.java:419)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.queryType(CsmCompletionQuery.java:347)
at org.netbeans.modules.cnd.completion.cplusplus.CsmExpressionResolverImpl.resolveType(CsmExpressionResolverImpl.java:71)
at org.netbeans.modules.cnd.api.model.services.CsmExpressionResolver$Default.resolveType(CsmExpressionResolver.java:445)
at org.netbeans.modules.cnd.api.model.services.CsmExpressionResolver.resolveType(CsmExpressionResolver.java:179)
at org.netbeans.modules.cnd.modelimpl.csm.DeclTypeImpl.resolve(DeclTypeImpl.java:212)
at org.netbeans.modules.cnd.modelimpl.csm.DeclTypeImpl.isConst(DeclTypeImpl.java:166)
at org.netbeans.modules.cnd.modelimpl.csm.DeclTypeImpl.isConst(DeclTypeImpl.java:159)
at org.netbeans.modules.cnd.modelimpl.csm.TypeImpl.decorateText(TypeImpl.java:756)
at org.netbeans.modules.cnd.modelimpl.csm.TypeImpl.getText(TypeImpl.java:740)
at org.netbeans.modules.cnd.modelimpl.csm.Instantiation.getInstantiatedText(Instantiation.java:2765)
at org.netbeans.modules.cnd.modelimpl.impl.services.InstantiationProviderImpl.getInstantiatedText(InstantiationProviderImpl.java:471)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmResultItem.getTypeName(CsmResultItem.java:258)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmResultItem$MethodResultItem.<init>(CsmResultItem.java:972)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmResultItem$GlobalFunctionResultItem.<init>(CsmResultItem.java:882)
at org.netbeans.modules.cnd.completion.cplusplus.NbCsmResultItem$NbGlobalFunctionResultItem.<init>(NbCsmResultItem.java:176)
at org.netbeans.modules.cnd.completion.cplusplus.NbCsmCompletionQuery$NbCsmItemFactory.createGlobalFunctionResultItem(NbCsmCompletionQuery.java:344)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.createResultItem(CsmCompletionQuery.java:4562)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.convertData(CsmCompletionQuery.java:4485)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.access$2900(CsmCompletionQuery.java:176)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery$CsmCompletionResult.<init>(CsmCompletionQuery.java:4129)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery$Context.resolveExp(CsmCompletionQuery.java:1950)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.getResolvedContext(CsmCompletionQuery.java:884)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.getResult(CsmCompletionQuery.java:837)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.queryImpl(CsmCompletionQuery.java:598)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.query(CsmCompletionQuery.java:543)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.query(CsmCompletionQuery.java:536)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.query(CsmCompletionQuery.java:254)
at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.query(CsmCompletionQuery.java:233)
at org.netbeans.modules.cnd.completion.cplusplus.CsmCompletionProvider$Query.query(CsmCompletionProvider.java:283)
at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:198)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Caused: org.openide.util.RequestProcessor$FastItem: task failed due to