Project: Eclipse_Platform_UI
Bug 307858 [Markers] UIUpdateJob may throw SWTException if control has been disposed
Reported: 2010-04-01 08:23:24 | Status: resolved fixed

The runInUIThread(IProgressMonitor) method looks something like this... try { /* ... */ if (viewer.getControl().isDisposed()) { return Status.CANCEL_STATUS; } /* ... */ } finally { viewer.getTree().setRedraw(true); /* ... */ } The problem here is that the 'finally' block gets executed if the control is disposed. Since the control has been disposed, the setRedraw(boolean) invocation throws an SWTException. org.eclipse.swt.SWTException: Widget is disposed 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:467) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:340) at org.eclipse.swt.widgets.Tree.setRedraw(Tree.java:4734) at org.eclipse.ui.internal.views.markers.UIUpdateJob.runInUIThread(UIUpdateJob.java:120) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)

Files changed in fix:
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/UIUpdateJob.java