Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336052 - AbstractCLaunchDelegate{2} fails to launch if the Build throws Exception
Summary: AbstractCLaunchDelegate{2} fails to launch if the Build throws Exception
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 8.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: James Blackburn CLA
QA Contact: Ken Ryall CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-02 06:18 EST by James Blackburn CLA
Modified: 2011-02-02 11:23 EST (History)
2 users (show)

See Also:


Attachments
patch 1 (13.48 KB, patch)
2011-02-02 10:38 EST, James Blackburn CLA
jamesblackburn+eclipse: iplog-
Details | Diff

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