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 110883 - NPE in log file while CodeCompletion accuracy testrun
Summary: NPE in log file while CodeCompletion accuracy testrun
Status: RESOLVED DUPLICATE of bug 111393
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Sergey Grinev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-25 09:31 UTC by Alexander Pepin
Modified: 2007-09-06 18:04 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pepin 2007-07-25 09:31:44 UTC
While running automatic tests against code completion accuracy in persisted projects following NPEs appear in the log file:
*********** Exception occurred ************ at 3:30 PM on Jul 24, 2007
java.lang.NullPointerException
	at org.netbeans.modules.cnd.completion.cplusplus.CsmCompletionProvider$Query.query(CsmCompletionProvider.java:126)
	at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:195)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
*********** Exception occurred ************ at 3:30 PM on Jul 24, 2007
java.lang.NullPointerException
	at org.netbeans.modules.editor.completion.CompletionLayoutPopup.getScreenBounds(CompletionLayoutPopup.java:113)
	at org.netbeans.modules.editor.completion.CompletionLayoutPopup.isEnoughSpace(CompletionLayoutPopup.java:321)
	at org.netbeans.modules.editor.completion.CompletionLayoutPopup.showAlongOccupiedBounds(CompletionLayoutPopup.java:279)
	at org.netbeans.modules.editor.completion.CompletionLayoutPopup.showAlongAnchorBounds(CompletionLayoutPopup.java:266)
	at org.netbeans.modules.editor.completion.CompletionLayout.updateLayout(CompletionLayout.java:231)
	at org.netbeans.modules.editor.completion.CompletionLayout$CompletionPopup.show(CompletionLayout.java:326)
	at org.netbeans.modules.editor.completion.CompletionLayout.showCompletion(CompletionLayout.java:118)
	at org.netbeans.modules.editor.completion.CompletionImpl$3.actionPerformed(CompletionImpl.java:194)
	at javax.swing.Timer.fireActionPerformed(Timer.java:271)
	at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
[catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Alexander Pepin 2007-07-25 17:34:08 UTC
fixed in both tests and cnd (org-netbeans-modules-cnd-completion.jar)
Comment 2 Alexander Pepin 2007-07-26 15:54:35 UTC
In fact this is a new bug but I reopen the issue with a downgraded priority instead of creating a new one with the same
description. Please see the messages.log
http://techpubs.eng.sun.com/net/sqa42/export/home/tester/performance_results/netbeans-5.5.1/07_25_07/3/results/testrun_070725-221645/testbag_117/sys/ide/messages.log
Comment 3 Alexander Simon 2007-07-27 13:17:43 UTC
NPE from log http://techpubs.eng.sun.com/net/sqa42/export/home/tester/performance_results/netbeans-5.5.1/07_26_07/2/results/

java.lang.NullPointerException
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.hashCode(FileImpl.java:1107)
	at java.util.HashMap.put(HashMap.java:418)
	at java.util.HashSet.add(HashSet.java:194)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ChangeEventImpl.addNewFile(ChangeEventImpl.java:140)
	at org.netbeans.modules.cnd.modelimpl.csm.core.Notificator.registerNewFile(Notificator.java:113)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.<init>(FileImpl.java:147)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.createOrFindFileImpl(ProjectBase.java:970)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.createIfNeed(ProjectBase.java:560)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.createProjectFilesIfNeed(ProjectBase.java:537)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.createProjectFilesIfNeed(ProjectBase.java:516)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.ensureFilesCreated(ProjectBase.java:422)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.onAddedToModelImpl(ProjectBase.java:620)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase$2.run(ProjectBase.java:598)
	at org.netbeans.modules.cnd.modelimpl.csm.core.CodeModelRequestProcessor$1.run(CodeModelRequestProcessor.java:57)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
Comment 4 Sergey Grinev 2007-07-30 20:21:27 UTC
Bug appears only for one test on particular machine (slow one). It seems it produced by issue described in the IZ111393
Reopening the same project instantly right after closing produce exceptions.

Alexander increased timeout for 5 to 10s between closing and reopening project in test on slow machine to validate this
on next test cycle.

Comment 5 Vladimir Kvashin 2007-08-09 14:07:58 UTC

*** This issue has been marked as a duplicate of 111393 ***