Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 372553 - [regression] could not auto close editor: Invalid thread access
Summary: [regression] could not auto close editor: Invalid thread access
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.7   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 226618
  Show dependency tree
 
Reported: 2012-02-24 17:59 EST by Sam Davis CLA
Modified: 2012-02-25 05:28 EST (History)
0 users

See Also:


Attachments
mylyn/context/zip (48.56 KB, application/octet-stream)
2012-02-25 05:28 EST, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Davis CLA 2012-02-24 17:59:19 EST
I found this in my error log:

Error
Fri Feb 24 14:38:36 PST 2012
Could not auto close editor

org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4083)
at org.eclipse.swt.SWT.error(SWT.java:3998)
at org.eclipse.swt.SWT.error(SWT.java:3969)
at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:359)
at org.eclipse.swt.widgets.Widget.getData(Widget.java:525)
at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.getTab(DefaultTabFolder.java:186)
at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.getItems(DefaultTabFolder.java:238)
at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.findItem(AbstractTabFolder.java:171)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.getTab(PresentablePartFolder.java:375)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.internalRemove(PresentablePartFolder.java:210)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.remove(PresentablePartFolder.java:206)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.remove(LeftToRightTabOrder.java:58)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.removePart(TabbedStackPresentation.java:461)
at org.eclipse.ui.internal.PartStack.remove(PartStack.java:865)
at org.eclipse.ui.internal.EditorSashContainer.removeEditor(EditorSashContainer.java:282)
at org.eclipse.ui.internal.EditorAreaHelper.closeEditor(EditorAreaHelper.java:84)
at org.eclipse.ui.internal.EditorAreaHelper.closeEditor(EditorAreaHelper.java:62)
at org.eclipse.ui.internal.WorkbenchPage.closeEditors(WorkbenchPage.java:1379)
at org.eclipse.mylyn.internal.context.ui.state.EditorStateParticipant.closeContextAwareEditors(EditorStateParticipant.java:351)
at org.eclipse.mylyn.internal.context.ui.state.EditorStateParticipant.saveState(EditorStateParticipant.java:200)
at org.eclipse.mylyn.internal.context.ui.state.ContextStateManager$5.run(ContextStateManager.java:137)
at org.eclipse.mylyn.internal.context.ui.state.ContextStateManager$5.run(ContextStateManager.java:1)
at org.eclipse.mylyn.commons.core.CommonListenerList$1.run(CommonListenerList.java:93)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.mylyn.commons.core.CommonListenerList.notify(CommonListenerList.java:85)
at org.eclipse.mylyn.internal.context.ui.state.ContextStateManager.saveState(ContextStateManager.java:133)
at org.eclipse.mylyn.internal.context.tasks.ui.ContextStatePersistenceHandler.save(ContextStatePersistenceHandler.java:111)
at org.eclipse.mylyn.internal.context.tasks.ui.ContextStatePersistenceHandler.saved(ContextStatePersistenceHandler.java:130)
at org.eclipse.mylyn.internal.context.tasks.ui.TaskContextStore.saveActiveContext(TaskContextStore.java:208)
at org.eclipse.mylyn.internal.tasks.ui.util.AttachmentUtil.postContext(AttachmentUtil.java:88)
at org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage$SubmitTaskJobListener.taskSubmitted(AbstractTaskEditorPage.java:245)
at org.eclipse.mylyn.tasks.core.sync.SubmitJob.fireTaskSubmitted(SubmitJob.java:75)
at org.eclipse.mylyn.internal.tasks.core.sync.SubmitTaskJob.run(SubmitTaskJob.java:108)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Steffen Pingel CLA 2012-02-25 05:28:42 EST
Thanks for the bug report. This highlights two problems:

* Saving editor mementos modifies the workbench state.
* Context persistence maybe invoked from non-UI threads.

I have added a flag to support saving the workbench state suppressing any modifications and added checks that calls are on the UI thread.
Comment 2 Steffen Pingel CLA 2012-02-25 05:28:46 EST
Created attachment 211619 [details]
mylyn/context/zip