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

Bug 210819

Summary: exception when TaskListManager.activateTask() is called from non-UI thread
Product: z_Archived Reporter: Steffen Pingel <steffen.pingel>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED DUPLICATE QA Contact:
Severity: minor    
Priority: P4    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Steffen Pingel CLA 2007-11-23 16:54:42 EST
I got the exception below when trying to invoke activateTask() from a non-UI thread:

org.eclipse.swt.SWTException: Invalid thread access
	at org.eclipse.swt.SWT.error(SWT.java:3706)
	at org.eclipse.swt.SWT.error(SWT.java:3624)
	at org.eclipse.swt.SWT.error(SWT.java:3595)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:438)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:377)
	at org.eclipse.swt.widgets.Control.setRedraw(Control.java:3824)
	at org.eclipse.mylyn.context.ui.AbstractFocusViewAction.installInterestFilter(AbstractFocusViewAction.java:357)
	at org.eclipse.mylyn.context.ui.AbstractFocusViewAction.updateInterestFilter(AbstractFocusViewAction.java:318)
	at org.eclipse.mylyn.context.ui.AbstractFocusViewAction.valueChanged(AbstractFocusViewAction.java:220)
	at org.eclipse.mylyn.context.ui.AbstractFocusViewAction.update(AbstractFocusViewAction.java:195)
	at org.eclipse.mylyn.context.ui.AbstractAutoFocusViewAction.contextActivated(AbstractAutoFocusViewAction.java:70)
	at org.eclipse.mylyn.internal.context.core.InteractionContextManager.internalActivateContext(InteractionContextManager.java:540)
	at org.eclipse.mylyn.internal.context.core.InteractionContextManager.activateContext(InteractionContextManager.java:559)
	at org.eclipse.mylyn.tasks.ui.TasksUiPlugin$1.taskActivated(TasksUiPlugin.java:219)
	at org.eclipse.mylyn.tasks.ui.TaskListManager.activateTask(TaskListManager.java:331)
	at org.eclipse.mylyn.tasks.ui.TaskListManager.activateTask(TaskListManager.java:319)
Comment 1 Mik Kersten CLA 2007-11-26 23:40:04 EST
Task activation has been considered a UI action, because it has always been intended to correspond to a user's intention to activate a task.  So I wonder if we make this constraint explicit in the API, or if we should make actions like AbstractAutoFocusViewAction safe to calls made outside of the UI thread.
Comment 2 Steffen Pingel CLA 2009-06-20 16:57:27 EDT

*** This bug has been marked as a duplicate of bug 247092 ***