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

Bug 362105

Summary: [postmortem] Cancelling a launch during the prompt for the corefile gives an error
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: cdtdoug, nobody, pawel.1.piech
Version: 8.0Flags: nobody: review+
Target Milestone: 8.1.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Fix to propagate cancellation marc.khouzam: iplog-

Description Marc Khouzam CLA 2011-10-26 13:10:54 EDT
1- create a post-mortem launch
2- leave the corefile field empty to trigger a prompt
3- in the prompt, press cancel

I see this error popup as a dialog:

Error in final launch sequence
Sub-request RequestMonitor (org.eclipse.cdt.dsf.concurrent.DataRequestMonitor@190cdc5): Status CANCEL: unknown code=1  null was canceled and not handled.'

The logs show the following:

!ENTRY org.eclipse.cdt.dsf.gdb 4 5012 2011-10-26 13:08:42.466
!MESSAGE Error in final launch sequence
!STACK 1
org.eclipse.core.runtime.CoreException: Sub-request RequestMonitor (org.eclipse.cdt.dsf.concurrent.DataRequestMonitor@24539d): Status CANCEL: unknown code=1  null was canceled and not handled.'
	at org.eclipse.cdt.dsf.concurrent.Query.get(Query.java:114)
	at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugSession(GdbLaunchDelegate.java:213)
	at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:100)
	at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:89)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
	at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:928)
	at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1132)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
!SUBENTRY 1 org.eclipse.cdt.dsf 4 10005 2011-10-26 13:08:42.467
!MESSAGE Sub-request RequestMonitor (org.eclipse.cdt.dsf.concurrent.DataRequestMonitor@24539d): Status CANCEL: unknown code=1  null was canceled and not handled.'
Comment 1 Marc Khouzam CLA 2011-10-26 15:26:23 EDT
Created attachment 206027 [details]
Fix to propagate cancellation

This patch propagates the cancellation of one request monitor to its parent, so that the cancellation is properly handled.

I will commit to master.
Comment 2 Marc Khouzam CLA 2011-10-26 15:28:22 EDT
Committed to master.
Mikhail, can you review?
Comment 3 CDT Genie CLA 2011-10-26 16:23:04 EDT
*** cdt git genie on behalf of Marc Khouzam ***

    Bug 362105: Cancelling a launch during the prompt for the corefile gives an error

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=e4aed35b52b3147454de80a8793c912d617dc68f
Comment 4 Nobody - feel free to take it CLA 2011-10-27 15:38:40 EDT
Looks good.