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 256562

Summary: NullPointerException at javax.swing.text.JTextComponent.setCaretPosition
Product: platform Reporter: Alexander Pepin <apepin>
Component: TextAssignee: Miloslav Metelka <mmetelka>
Status: NEW ---    
Severity: normal CC: abalint21, alexvsimon, bartvdc, Danny1071, emiddio, issues, javatlacati, jiai, legitalk, lolo_101, markiewb, nzero2002, obrejla, rrohm, stefan79, Vitex
Priority: P2    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 220724
Attachments: stacktrace
stacktrace
stacktrace
stacktrace
stacktrace

Description Alexander Pepin 2015-11-12 16:43:49 UTC
Build: NetBeans IDE 8.1 (Build cnd-build-11765-on-20151112)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.60-b23, Java(TM) SE Runtime Environment, 1.8.0_60-b27
OS: Linux

User Comments:
apepin: -set breakpoint in java code on a native method invocation 
-set breakpoint in java code after  a native method invocation
- start debugging  
- when the first breakpoint is reached do step into the native method
- do step over in the native code then press continue
- when the second BP is reached press continue to complete debugging
Result: NPE occurs together with couple of debugger error  windows.

GUEST: debugging




Stacktrace: 
java.lang.NullPointerException
   at javax.swing.text.JTextComponent.setCaretPosition(JTextComponent.java:1631)
   at org.openide.text.DocumentOpenClose$DocumentLoad$1.run(DocumentOpenClose.java:806)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
   at java.awt.EventQueue.access$500(EventQueue.java:97)
   at java.awt.EventQueue$3.run(EventQueue.java:709)
Comment 1 Alexander Pepin 2015-11-12 16:43:51 UTC
Created attachment 157312 [details]
stacktrace
Comment 2 Alexander Pepin 2015-11-12 16:46:55 UTC
In CND the same situation occurs with a bit different exceptions and debugger error windows
Comment 3 Alexander Pepin 2015-11-12 16:50:42 UTC
please disregard the latest comment #2
Comment 4 Alexander Pepin 2015-11-12 16:52:10 UTC
see also bug #256544
Comment 5 Alexander Pepin 2015-11-12 16:57:59 UTC
One more concomitant exception
java.lang.NullPointerException
	at org.netbeans.modules.cnd.debugger.gdb2.GdbDebuggerImpl.makeThreadCurrent(GdbDebuggerImpl.java:1860)
	at org.netbeans.modules.cnd.debugger.gdb2.GdbDebuggerImpl$21.onDone(GdbDebuggerImpl.java:2320)
	at org.netbeans.modules.cnd.debugger.gdb2.mi.MICommandManager.dispatch(MICommandManager.java:194)
	at org.netbeans.modules.cnd.debugger.gdb2.mi.MIProxy.dispatch(MIProxy.java:188)
	at org.netbeans.modules.cnd.debugger.gdb2.Gdb$MyMIProxy.dispatch(Gdb.java:697)
	at org.netbeans.modules.cnd.debugger.gdb2.mi.MIProxy.result(MIProxy.java:193)
	at org.netbeans.modules.cnd.debugger.gdb2.mi.MIProxy.processLine(MIProxy.java:157)
	at org.netbeans.modules.cnd.debugger.gdb2.Tap$4.run(Tap.java:327)
Caused: java.lang.Exception: when processing line: 155^done,threads=[]

	at org.netbeans.modules.cnd.debugger.gdb2.Tap$4.run(Tap.java:329)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
Comment 6 Alexander Simon 2015-12-15 14:19:59 UTC
Created attachment 157795 [details]
stacktrace

close editor
Comment 7 Exceptions Reporter 2015-12-17 14:08:04 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=220724
Comment 8 Vitex 2015-12-17 15:08:03 UTC
Created attachment 157824 [details]
stacktrace

Closing projec opened twice
Comment 9 markiewb 2016-02-14 18:37:49 UTC
Created attachment 158495 [details]
stacktrace

Closing several files, while switching to a differnt git branch
Comment 10 stefan79 2017-01-27 08:59:43 UTC
Created attachment 163482 [details]
stacktrace

NullPointer occured (after closing a Java-src-file).
Comment 11 javatlacati 2017-04-30 21:59:06 UTC
Issue has already 45 duplicates