Bug 302305 - Migrate Move to Line and Resume At Line actions to use the asynchronous DebugCommandAction
Summary: Migrate Move to Line and Resume At Line actions to use the asynchronous Debug...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 7.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-09 12:50 EST by Pawel Piech CLA
Modified: 2020-09-04 15:20 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Piech CLA 2010-02-09 12:50:49 EST
See bug 302273 comment #10 for more details.
Comment 1 Eclipse Genie CLA 2016-03-08 20:35:57 EST
New Gerrit change created: https://git.eclipse.org/r/68007
Comment 2 Mario Pierro CLA 2016-03-08 20:46:29 EST
One of the most relevant problems with using blocking queries is that ResumeAtLineAdapter executes very often to determine the enablement status of the corresponding UI action.

If for some reason the DSF session executor thread does not run the query, the UI will stop responding being stuck in 

Thread [main] (Suspended (breakpoint at line 72 in ResumeAtLine))	
	owns: RunnableLock  (id=170)	
	ResumeAtLine.canResumeAtLine(String, int) line: 72	
	ResumeAtLineAdapter.canResumeAtLine(IWorkbenchPart, ISelection, ISuspendResume) line: 141	
	ResumeAtLineActionDelegate$1.run() line: 123	
	RunnableLock.run() line: 35	
	UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 182	
	Display.runAsyncMessages(boolean) line: 4166	
	Display.readAndDispatch() line: 3782	
	PartRenderingEngine$4.run() line: 1118	
	Realm.runWithDefault(Realm, Runnable) line: 336	
	PartRenderingEngine.run(MApplicationElement, IEclipseContext) line: 1019	
	E4Workbench.createAndRunUI(MApplicationElement) line: 157	
	Workbench$5.run() line: 691	
	Realm.runWithDefault(Realm, Runnable) line: 336	
	Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 604	
	PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 150	
	IDEApplication.start(IApplicationContext) line: 138	
	EclipseAppHandle.run(Object) line: 196	
	EclipseAppLauncher.runApplication(Object) line: 134	
	EclipseAppLauncher.start(Object) line: 104	
	EclipseStarter.run(Object) line: 388	
	EclipseStarter.run(String[], Runnable) line: 243	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: not available	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available	
	Method.invoke(Object, Object...) line: not available	
	Main.invokeFramework(String[], URL[]) line: 670	
	Main.basicRun(String[]) line: 609	
	Main.run(String[]) line: 1516	
	Main.main(String[]) line: 1489	

The proposed change adds a small timeout so that commands are disabled in case of an unresponsive DSF executor thread, as a workaround until DebugCommandAction is used.
Comment 3 Mario Pierro CLA 2016-03-08 20:49:21 EST
Change submitted during CDT Hackaton at EclipseCon 2016 :)