Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337280

Summary: NPE in TCFBreakpointStatusListener when first launch is disconnected
Product: [Tools] TCF Reporter: Anton Leherbauer <aleherb+eclipse>
Component: DebugAssignee: Project Inbox <tcf.debug-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eugene
Version: unspecified   
Target Milestone: 0.4.0   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch cdtdoug: iplog-

Description Anton Leherbauer CLA 2011-02-16 02:58:06 EST
This happens for the first launch only when the TCFBreakpointStatusListener
is not instantiated yet, because upon instantiation it does not add a launch listener for already connected launches and runs into this NPE on disconnect.

java.lang.NullPointerException
at
org.eclipse.tm.internal.tcf.cdt.ui.TCFBreakpointStatusListener$1.onDisconnected(TCFBreakpointStatusListener.java:131)
at
org.eclipse.tm.internal.tcf.debug.ui.model.TCFModelManager$1.onDisconnected(TCFModelManager.java:66)
at
org.eclipse.tm.internal.tcf.debug.model.TCFLaunch.onDisconnected(TCFLaunch.java:279)
at
org.eclipse.tm.internal.tcf.debug.model.TCFLaunch.access$33(TCFLaunch.java:271)
at
org.eclipse.tm.internal.tcf.debug.model.TCFLaunch$30.onChannelClosed(TCFLaunch.java:979)
at org.eclipse.tm.tcf.core.AbstractChannel$9.run(AbstractChannel.java:680)
at org.eclipse.tm.tcf.EventQueue.run(EventQueue.java:99)
at java.lang.Thread.run(Thread.java:619)
Comment 1 Anton Leherbauer CLA 2011-02-16 02:58:43 EST
Created attachment 189074 [details]
Proposed patch

This adds a launch listener for already connected launch(es).
Comment 2 Eugene Tarassov CLA 2011-02-16 11:16:27 EST
Committed the patch.
Thanks!