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 254667

Summary: NullPointerException at javax.swing.text.JTextComponent.getCaretPosition
Product: editor Reporter: jarome <jarome>
Component: NavigationAssignee: Milutin Kristofic <mkristofic>
Status: NEW ---    
Severity: normal CC: mentlicher
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 219401
Attachments: stacktrace

Description jarome 2015-08-24 19:11:55 UTC
Build: NetBeans IDE 8.1 Beta (Build 201508041349)
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:
jarome: I tried to unset a breakpoint while my program had a dialog box displayed




Stacktrace: 
java.lang.NullPointerException
   at javax.swing.text.JTextComponent.getCaretPosition(JTextComponent.java:1644)
   at org.netbeans.modules.debugger.jpda.projectsui.EditorContextImpl.getCurrentClassDeclaration(EditorContextImpl.java:730)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:0)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:497)
Comment 1 jarome 2015-08-24 19:11:57 UTC
Created attachment 155593 [details]
stacktrace
Comment 2 Martin Entlicher 2015-08-25 09:50:49 UTC
This must be a bug of the editor.
The user clicked somewhere into the gutter:
at org.netbeans.editor.GlyphGutter$GutterMouseListener.mouseClicked(GlyphGutter.java:962)
but when I try to find out where, the component's caret is null.