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 200968

Summary: NullPointerException at org.netbeans.modules.cnd.completion.includes.CsmIncludeCompletionQuery.query
Product: cnd Reporter: sjh <sjh>
Component: Code CompletionAssignee: Vladimir Voskresensky <vv159170>
Status: VERIFIED FIXED    
Severity: normal CC: splineshaft, vkvashin
Priority: P2    
Version: 7.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 180620
Attachments: stacktrace
stacktrace

Description sjh 2011-08-15 16:31:57 UTC
This bug was originally marked as duplicate of bug 123039, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.0.1 (Build 201107282000)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.1-b02-384, Java(TM) SE Runtime Environment, 1.6.0_26-b03-384-10M3425
OS: Mac OS X

User Comments:
sjh: I was just editing code.  I had previously loaded a few projects, closed one of them before it finished loading.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.cnd.completion.includes.CsmIncludeCompletionQuery.query(CsmIncludeCompletionQuery.java:80)
   at org.netbeans.modules.cnd.completion.includes.CsmIncludeCompletionProvider$Query.getItems(CsmIncludeCompletionProvider.java:248)
   at org.netbeans.modules.cnd.completion.includes.CsmIncludeCompletionProvider$Query.query(CsmIncludeCompletionProvider.java:167)
   at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:223)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
   at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
Comment 1 sjh 2011-08-15 16:32:01 UTC
Created attachment 109988 [details]
stacktrace
Comment 2 Exceptions Reporter 2011-09-07 07:29:11 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=180620
Comment 3 Alexander Simon 2011-09-07 07:38:05 UTC
It seems it is regression in NB 7.0.1
Comment 4 splineshaft 2011-09-07 15:41:12 UTC
Created attachment 110488 [details]
stacktrace
Comment 5 Vladimir Voskresensky 2011-09-07 16:25:22 UTC
regression caused by fix of issue #197227
http://hg.netbeans.org/releases/rev/d03ffcdae79f
Comment 6 Vladimir Voskresensky 2011-09-07 16:53:52 UTC
http://hg.netbeans.org/cnd-main/rev/f2d656d83e5f
Comment 7 Quality Engineering 2011-09-08 14:28:49 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/f2d656d83e5f
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #200968  -  NullPointerException at org.netbeans.modules.cnd.completion.includes.CsmIncludeCompletionQuery.query
- extract file object from document if csm file is absent
Comment 8 Vladimir Kvashin 2011-09-12 16:19:43 UTC
I reviewed the fix; it is correct and safe.
Comment 9 Vladimir Kvashin 2011-09-12 18:02:31 UTC
Integrated into releases_elif:
http://elif.russia.sun.com/hg/releases_elif/rev/e229ec2f0dfe
Comment 10 Alexander Pepin 2011-09-21 09:53:42 UTC
can not reproduce in OSS build 30
Comment 11 Quality Engineering 2011-09-26 13:35:37 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/e229ec2f0dfe
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #200968  -  NullPointerException at org.netbeans.modules.cnd.completion.includes.CsmIncludeCompletionQuery.query
- extract file object from document if csm file is absent
(transplanted from f2d656d83e5fcc4149d8fb9e0ed379ecd767caf6)
Comment 12 Alexander Pepin 2011-09-27 12:58:16 UTC
can not reproduce in OSS dev build based on 7.0.1 patch2