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

Bug 323996

Summary: [launch] FinalLaunchSequence could throw an NPE
Product: [Tools] CDT Reporter: Marc Khouzam <marc.khouzam>
Component: cdt-debug-dsf-gdbAssignee: Marc Khouzam <marc.khouzam>
Status: RESOLVED FIXED QA Contact: Marc Khouzam <marc.khouzam>
Severity: normal    
Priority: P3 CC: elaskavaia.cdt, pawel.1.piech
Version: 7.0Flags: marc.khouzam: review? (elaskavaia.cdt)
Target Milestone: 7.0.1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Fix for HEAD
marc.khouzam: iplog-
Fix for 7_0 marc.khouzam: iplog-

Description Marc Khouzam CLA 2010-08-30 12:46:51 EDT
I noticed the following code in FinalLaunchSequence:

fCommandControl = fTracker.getService(IGDBControl.class);
if (fCommandControl == null) {
  requestMonitor.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, "Cannot obtain control service", null)); //$NON-NLS-1$
}
fCommandFactory = fCommandControl.getCommandFactory();

The last line will NPE if fCommandControl is null.
Comment 1 Marc Khouzam CLA 2010-08-30 13:08:02 EDT
Created attachment 177753 [details]
Fix for HEAD

Fix for HEAD which also merges three steps into a single one.  This is better for our FinalLaunchSequence extendability effort.

Committed to HEAD.
Comment 2 Marc Khouzam CLA 2010-08-30 13:15:50 EDT
Created attachment 177754 [details]
Fix for 7_0

Simpler fix for 7_0.  Committed.
Comment 3 Marc Khouzam CLA 2010-08-30 13:16:42 EDT
Elena, can you review?