Community
Participate
Working Groups
I have had the following exception when terminating a debug session with the multicore visualizer open. I was not able to reproduce it, so it might be caused to a rare race condition. java.lang.NullPointerException at org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.view.MulticoreVisualizerEventListener.handleEvent(MulticoreVisualizerEventListener.java:190) at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.cdt.dsf.service.DsfSession.doDispatchEvent(DsfSession.java:519) at org.eclipse.cdt.dsf.service.DsfSession.access$2(DsfSession.java:463) at org.eclipse.cdt.dsf.service.DsfSession$3.run(DsfSession.java:390) at org.eclipse.cdt.dsf.concurrent.DefaultDsfExecutor$TracingWrapperRunnable.run(DefaultDsfExecutor.java:374) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
Proposed patch pushed to gerrit: https://git.eclipse.org/r/#/c/10290/ In this case, preventing against the NPE seems to be a safe approach: the likely scenario is that the debugging session is being killed and a thread has terminated, triggering the IExitedDMEvent event. The NPE happens when we process the event and then attempt to refresh the canvas which has already being disposed.
w/r to the following patch, I declare the following: 1) that I am authorized to submit this code change 2) that the code is 100% my own work
Thanks Marc, that looks like a good fix. Please update the copyright header and I will commit it.
Committed to master. Thanks!