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 256544 - NullPointerException at org.netbeans.modules.debugger.ui.views.debugging.DebuggingViewComponent$4.run
Summary: NullPointerException at org.netbeans.modules.debugger.ui.views.debugging.Debu...
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-12 10:58 UTC by Alexander Pepin
Modified: 2016-02-08 12:12 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 221118


Attachments
stacktrace (1.21 KB, text/plain)
2015-11-12 10:58 UTC, Alexander Pepin
Details
the second exception (4.98 KB, text/plain)
2015-11-12 12:29 UTC, Alexander Pepin
Details
The third exception (5.05 KB, text/plain)
2015-11-12 12:30 UTC, Alexander Pepin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pepin 2015-11-12 10:58:43 UTC
Build: IDE for C, C++, and Fortran (Studio 12.5 Beta [2015/11/10 d677fe8ba167])
VM: Java HotSpot(TM) 64-Bit Server VM, 24.65-b04, Java(TM) SE Runtime Environment, 1.7.0_67-b01
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 dbx worning windows.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.debugger.ui.views.debugging.DebuggingViewComponent$4.run(DebuggingViewComponent.java:453)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
   at java.awt.EventQueue.access$200(EventQueue.java:103)
   at java.awt.EventQueue$3.run(EventQueue.java:694)
   at java.awt.EventQueue$3.run(EventQueue.java:692)
Comment 1 Alexander Pepin 2015-11-12 10:58:44 UTC
Created attachment 157300 [details]
stacktrace
Comment 2 Alexander Pepin 2015-11-12 12:28:24 UTC
In fact two more exception occur as well.
Comment 3 Alexander Pepin 2015-11-12 12:29:35 UTC
Created attachment 157302 [details]
the second exception
Comment 4 Alexander Pepin 2015-11-12 12:30:13 UTC
Created attachment 157303 [details]
The third exception
Comment 5 soldatov 2015-11-12 12:54:46 UTC
Also On Solaris I see such dialog windows:
1) glue: MsgSnd.snd_via(): socket write of msg 'DBX_STACK_NOTIFY' failed -- Broken pipe
2) glue: MsgSnd.snd_via(): no socket -- msg 'DBX_THREADS_NOTIFY dropped
3) glue: MsgSnd.snd_via(): socket write of msg 'dbx_locals_notify' failed -- Broken pipe
Comment 6 Alexander Pepin 2015-11-12 16:55:58 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 7 Alexander Pepin 2015-11-12 16:57:18 UTC
please disregard comment #6
see also bug #256562
Comment 8 henk89 2015-11-13 15:54:32 UTC
If a modal dialog appears during the context switch (or maybe during the disposal) in the debugging view the NPE occurs.
Comment 9 Martin Entlicher 2015-11-13 20:36:30 UTC
I did not reproduce it, but should be fixed by changeset:   293575:1a941c342ea4
http://hg.netbeans.org/core-main/rev/1a941c342ea4

Please verify after the fix propagates to a daily build.
Comment 10 Quality Engineering 2015-11-15 02:35:25 UTC
Integrated into 'main-silver', will be available in build *201511150002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/1a941c342ea4
User: mentlicher@netbeans.org
Log: #256544: Fixing NPE when treeView is reset e.g. in a modal dialog events processing.
Comment 11 Vladimir Voskresensky 2015-11-15 10:52:02 UTC
Martin, can you explain the fix, please?
You introduce local variable and then don't use it (only write it)
Comment 12 Martin Entlicher 2015-11-18 07:44:15 UTC
Oops, I'm sorry. Yes, I forgot to actually replace the usage of treeView field with the local variable. :-(
Comment 13 Martin Entlicher 2015-11-18 07:52:57 UTC
Finally fixed by changeset:   293824:5cb462197b07
http://hg.netbeans.org/core-main/rev/5cb462197b07
Please verify.
Comment 14 Quality Engineering 2015-11-19 02:24:34 UTC
Integrated into 'main-silver', will be available in build *201511190002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/5cb462197b07
User: mentlicher@netbeans.org
Log: #256544: Fixing NPE when treeView becomes null - 2nd part of the previous change.
Comment 15 Jiri Prox 2015-12-17 15:17:28 UTC
Alexander can you, please, verify the fix?

Thanks
Comment 16 Alexander Pepin 2015-12-17 15:20:35 UTC
Yes, could you please send me fixed jar file (8.1 based).
Comment 17 Martin Entlicher 2015-12-17 17:55:08 UTC
It's already transplanted in the release81 branch.
I do not know who have put it there.
Comment 18 Jiri Kovalsky 2015-12-17 21:35:45 UTC
Then this will be part of 8.1 Patch 1 update.
Comment 19 Martin Entlicher 2016-01-26 07:07:18 UTC
Somebody managed to delete Alexander's message and revert his verification ?!?
HOW?!?

Alexander, please submit a separate issue for this:
glue: MsgSnd.snd_via(): socket write of msg 'dbx_mem_notify' failed -- Broken
pipe
It's not related to NB debugger infrastructure, but Studio dbx integration.
Comment 20 Alexander Pepin 2016-01-26 12:36:40 UTC
Yes, something strange happened...
This bug can be considered as fixed.
The only remaining issue is glue warning windows mentioned in comment #5. 
Now the last glue message is changed to
glue: MsgSnd.snd_via(): socket write of msg 'dbx_mem_notify' failed -- Broken
pipe.
And I will file a bug against Studio IDE in BugDB.
Comment 21 Alexander Pepin 2016-02-08 12:12:43 UTC
Verified in build 20160130.