This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 251871 - NullPointerException at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmResultItem.getTypeName
Summary: NullPointerException at org.netbeans.modules.cnd.completion.cplusplus.ext.Csm...
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-15 20:31 UTC by Exceptions Reporter
Modified: 2015-09-26 12:58 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 216780


Attachments
stacktrace (3.51 KB, text/plain)
2015-04-15 20:31 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2015-04-15 20:31:36 UTC
This issue was reported manually by alexvsimon.
It already has 1 duplicates 


Build: NetBeans IDE 8.0.2 (Build 201411181905)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.25-b02, Java(TM) SE Runtime Environment, 1.8.0_25-b17
OS: Mac OS X

User Comments:
GUEST: debugging




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmResultItem.getTypeName(CsmResultItem.java:255)
   at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmResultItem$MethodResultItem.<init>(CsmResultItem.java:897)
   at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmResultItem$GlobalFunctionResultItem.<init>(CsmResultItem.java:825)
   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:341)
   at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.createResultItem(CsmCompletionQuery.java:3951)
Comment 1 Exceptions Reporter 2015-04-15 20:31:38 UTC
Created attachment 153223 [details]
stacktrace
Comment 2 Vladimir Kvashin 2015-09-25 21:09:21 UTC
Function getReturnType() returned null. Majority of places in completion code checks this return value for null, but this place does not.

Added null check and a soft assert in console

http://hg.netbeans.org/cnd-main/rev/19d833340349
http://hg.netbeans.org/cnd-main/rev/96abf49f3ad4
Comment 3 Quality Engineering 2015-09-26 12:58:47 UTC
Integrated into 'main-silver', will be available in build *201509261150* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/19d833340349
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: fixed #251871 - NullPointerException at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmResultItem.getTypeName