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 262206

Summary: NullPointerException at org.netbeans.lib.editor.util.swing.GapBranchElement.getElementIndex
Product: editor Reporter: Andrew Krasny <akrasny>
Component: Painting & PrintingAssignee: Miloslav Metelka <mmetelka>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 224188
Attachments: stacktrace

Description Andrew Krasny 2016-05-24 13:13:10 UTC
Build: NetBeans IDE Dev (Build 20160520-0e4d77c492ec)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.51-b03, Java(TM) SE Runtime Environment, 1.8.0_51-b16
OS: Mac OS X

User Comments:
akrasny: no particular steps...
Edited remote C++ code, then connection was lost and I reconnected, then pasted some text from buffer into the current file. At this point NPE was rised.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.lib.editor.util.swing.GapBranchElement.getElementIndex(GapBranchElement.java:123)
   at org.netbeans.modules.editor.lib2.document.LineRootElement.getElementIndex(LineRootElement.java:105)
   at org.netbeans.api.editor.document.LineDocumentUtils.getLineIndex(LineDocumentUtils.java:341)
   at org.netbeans.modules.cnd.completion.impl.xref.ReferencesSupport.findDeclaration(ReferencesSupport.java:280)
   at org.netbeans.modules.cnd.completion.impl.xref.ReferencesSupport.findReferencedObject(ReferencesSupport.java:227)
   at org.netbeans.modules.cnd.completion.impl.xref.ReferenceImpl.getReferencedObjectImpl(ReferenceImpl.java:134)
Comment 1 Andrew Krasny 2016-05-24 13:13:12 UTC
Created attachment 159860 [details]
stacktrace
Comment 2 Milutin Kristofic 2016-07-14 10:35:33 UTC
Sorry, my mistake. Sending to Mila for review.