Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323996 - [launch] FinalLaunchSequence could throw an NPE
Summary: [launch] FinalLaunchSequence could throw an NPE
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 7.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 7.0.1   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-30 12:46 EDT by Marc Khouzam CLA
Modified: 2010-08-30 13:23 EDT (History)
2 users (show)

See Also:
marc.khouzam: review? (elaskavaia.cdt)


Attachments
Fix for HEAD (2.39 KB, patch)
2010-08-30 13:08 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff
Fix for 7_0 (1017 bytes, patch)
2010-08-30 13:15 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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?