Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Disassembly view throws NPE when debugging with CDI

When debugging a program with a large share library linked over a remote
target, the program takes some time to be load the share library. During
this loading period if I have the Disassembly view opened it will throw
NPE with below trace:

java.lang.NullPointerException
at
org.eclipse.cdt.debug.internal.ui.disassembly.dsf.DisassemblyBackendCdi.setDebugContext(DisassemblyBackendCdi.java:132)
at
org.eclipse.cdt.dsf.debug.internal.ui.disassembly.DisassemblyPart.updateDebugContext(DisassemblyPart.java:1798)
at org.eclipse.cdt.dsf.debug.internal.ui.disassembly.DisassemblyView
$1.selectionChanged(DisassemblyView.java:66)
at org.eclipse.ui.internal.AbstractPartSelectionTracker
$1.run(AbstractPartSelectionTracker.java:119)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.runtime.Platform.run(Platform.java:888)
at
org.eclipse.ui.internal.AbstractPartSelectionTracker.fireSelection(AbstractPartSelectionTracker.java:117)
at org.eclipse.ui.internal.PagePartSelectionTracker
$1.selectionChanged(PagePartSelectionTracker.java:49)
......................................

Looking at
org.eclipse.cdt.debug.internal.ui.disassembly.dsf.DisassemblyBackendCdi.setDebugContext(DisassemblyBackendCdi.java:132), it does a "fTargetContext.getTopStackFrame()". This function can return Null if the thread is not in suspended mode thus the stack frame is an empty list.

In our case the program is in the process of loading the share library
so its thread is not suspended.

It's pretty re-producible with CDI. I haven't seen this problem with
DSF.

Is it simply a miss to check for Null condition or is it something
deeper in the code?

Thanks,
Andy


Back to the top