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 209756

Summary: NullPointerException at org.netbeans.lib.editor.util.swing.DocumentUtilities.getDocumentVersion
Product: java Reporter: MackSix
Component: HintsAssignee: Jan Lahoda <jlahoda>
Status: RESOLVED FIXED    
Severity: normal CC: gtg, lhochet
Priority: P3    
Version: 7.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 186023
Attachments: stacktrace

Description MackSix 2012-03-19 18:47:48 UTC
Build: NetBeans IDE Dev (Build 201203190400)
VM: Java HotSpot(TM) Client VM, 22.1-b02, Java(TM) SE Runtime Environment, 1.7.0_03-b05
OS: Windows Vista

User Comments:
MackSix: Just opened a new project and the was closing open Java source files in editor.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.lib.editor.util.swing.DocumentUtilities.getDocumentVersion(DocumentUtilities.java:892)
   at org.netbeans.modules.java.hints.providers.spi.PositionRefresherHelper$DocumentVersion.<init>(PositionRefresherHelper.java:90)
   at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask$HintPositionRefresherHelper.setVersion(HintsTask.java:210)
   at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask$HintPositionRefresherHelper.access$100(HintsTask.java:188)
   at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:124)
   at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:83)
Comment 1 MackSix 2012-03-19 18:47:51 UTC
Created attachment 116882 [details]
stacktrace
Comment 2 MackSix 2012-03-19 18:59:31 UTC
I had just checked "Visualize Additional Layout Information" in Options>>Java>>GUI Builder. Then I opened a new project (with a form). I was closing some Java source files in the editor for a project already opened (that had a form) and this NullPointerException occurred. 

I can't reproduce it now.
Comment 3 Milutin Kristofic 2012-03-20 10:53:38 UTC
It looks like it comes from change in bug #209424
Comment 4 Milutin Kristofic 2012-03-20 15:24:13 UTC
*** Bug 209674 has been marked as a duplicate of this bug. ***
Comment 5 Jan Lahoda 2012-03-20 17:15:44 UTC
http://hg.netbeans.org/jet-main/rev/fb8dcf660cee
Comment 6 Quality Engineering 2012-03-21 12:05:30 UTC
Integrated into 'main-golden', will be available in build *201203210400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/fb8dcf660cee
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #209756: preventing NPE.