Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338538 - NPE in TCFBreakpointStatusListener during launch
Summary: NPE in TCFBreakpointStatusListener during launch
Status: RESOLVED FIXED
Alias: None
Product: TCF
Classification: Tools
Component: Debug (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.4.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-01 09:45 EST by Anton Leherbauer CLA
Modified: 2013-06-05 05:54 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (1.30 KB, patch)
2011-03-01 10:05 EST, Anton Leherbauer CLA
cdtdoug: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Leherbauer CLA 2011-03-01 09:45:37 EST
This can happen due to a race condition when a launch is added to the launch manager but has not yet started connecting.

Unhandled exception in TCF event dispatch
java.lang.NullPointerException
	at org.eclipse.tm.internal.tcf.cdt.ui.TCFBreakpointStatusListener$BreakpointListener.<init>(TCFBreakpointStatusListener.java:55)
	at org.eclipse.tm.internal.tcf.cdt.ui.TCFBreakpointStatusListener$1.onConnected(TCFBreakpointStatusListener.java:193)
	at org.eclipse.tm.internal.tcf.cdt.ui.TCFBreakpointStatusListener.<init>(TCFBreakpointStatusListener.java:215)
	at org.eclipse.tm.internal.tcf.cdt.ui.Activator$1.run(Activator.java:38)
	at org.eclipse.tm.tcf.EventQueue.run(EventQueue.java:99)
	at java.lang.Thread.run(Unknown Source)
Comment 1 Anton Leherbauer CLA 2011-03-01 10:01:26 EST
The stack trace in comment 0 is from a modified file.  Here is the stack trace for the original file.
java.lang.NullPointerException
    at
org.eclipse.tm.internal.tcf.cdt.ui.TCFBreakpointStatusListener$BreakpointListener.<init>(TCFBreakpointStatusListener.java:46)
    at
org.eclipse.tm.internal.tcf.cdt.ui.TCFBreakpointStatusListener$1.onConnected(TCFBreakpointStatusListener.java:129)
    at
org.eclipse.tm.internal.tcf.cdt.ui.TCFBreakpointStatusListener.<init>(TCFBreakpointStatusListener.java:151)
    at org.eclipse.tm.internal.tcf.cdt.ui.Activator$1.run(Activator.java:38)
    at org.eclipse.tm.tcf.EventQueue.run(EventQueue.java:99)
    at java.lang.Thread.run(Unknown Source)
Comment 2 Anton Leherbauer CLA 2011-03-01 10:05:45 EST
Created attachment 190040 [details]
Proposed patch

This adds another check before attaching the breakpoint listener to the launch.
Comment 3 Eugene Tarassov CLA 2011-03-02 01:19:25 EST
Committed.
Thanks!