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

Bug 336052

Summary: AbstractCLaunchDelegate{2} fails to launch if the Build throws Exception
Product: [Tools] CDT Reporter: James Blackburn <jamesblackburn+eclipse>
Component: cdt-debugAssignee: James Blackburn <jamesblackburn+eclipse>
Status: RESOLVED FIXED QA Contact: Ken Ryall <ken.ryall>
Severity: normal    
Priority: P3 CC: cdtdoug, pawel.1.piech
Version: 8.0   
Target Milestone: 8.0   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch 1 jamesblackburn+eclipse: iplog-

Description James Blackburn CLA 2011-02-02 06:18:00 EST
The contract on platform build says that the operation can throw CoreException or OperationCancelledException.  If the build does either of these, the launch terminates early.  The build may also cause the passed in monitor to be cancelled which seems to cause the overall launch to be cancelled.

We should treat build-run failures the same as build errors in the project, and allow the user to continue the launch.
Comment 1 James Blackburn CLA 2011-02-02 10:38:48 EST
Created attachment 188154 [details]
patch 1

Fix for the issue.

Catch exceptions from the build, and set a flag indicating that the build failed.
Add a new BuildProgressMonitor type which shields the parent progressmonitor from cancellation reported by the builder.

NB user-initiated top-level cancellation still works, as BuildProgressMonitor #isCanceled delegates to the parent progress monitor.  This fix only prevents build errors and build initiated cancellation from preventing launch.
Comment 2 James Blackburn CLA 2011-02-02 10:41:52 EST
Fixed in HEAD.