Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334940 - NPE in GdbPlugin.shutdownActiveLaunches() during simple junit tests
Summary: NPE in GdbPlugin.shutdownActiveLaunches() during simple junit tests
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: John Cortell CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-20 14:56 EST by John Cortell CLA
Modified: 2011-01-21 17:47 EST (History)
2 users (show)

See Also:


Attachments
Fix (1.20 KB, patch)
2011-01-20 15:01 EST, John Cortell CLA
john.cortell: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Cortell CLA 2011-01-20 14:56:32 EST
If you're running a simple junit test method (or class) where there is no debug session (say you're just testing a set of utilities), then the debug platform plugins don't get loaded. However, GdbPlugin.shutdownActiveLaunches() assumes they have and causes an NPE. A simple reference check is needed to avoid the NPE.
Comment 1 John Cortell CLA 2011-01-20 15:01:50 EST
Created attachment 187233 [details]
Fix

Committed to HEAD (trivial fix; no review requested)
Comment 2 CDT Genie CLA 2011-01-20 15:23:01 EST
*** cdt cvs genie on behalf of jcortell ***
Bug 334940: NPE in GdbPlugin.shutdownActiveLaunches() during simple junit tests

[*] GdbPlugin.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/GdbPlugin.java?root=Tools_Project&r1=1.3&r2=1.4
Comment 3 Marc Khouzam CLA 2011-01-21 13:21:52 EST
Should this be marked as fixed?
Comment 4 John Cortell CLA 2011-01-21 16:43:39 EST
Fixed.