Bug 307858 [Markers] UIUpdateJob may throw SWTException if control has been disposed
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)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/UIUpdateJob.java
private long lastUpdateTime=-1;
	/**
	 * @param view
	 *            the markers view base class
	 */
	public UIUpdateJob(ExtendedMarkersView view) {
		super(view.getSite().getShell().getDisplay(),
				MarkerMessages.MarkerView_19);
		this.view = view;
		updating = false;
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.
	 * IProgressMonitor)
	 */
	public IStatus runInUIThread(IProgressMonitor monitor) {
		if(monitor.isCanceled()){
			return Status.CANCEL_STATUS;
		}
		TreeViewer viewer = view.getViewer();
		Markers clone = view.getActiveViewerInputClone();
		try {
			updating = true;
			monitor.beginTask(MarkerMessages.MarkerView_19,
					IProgressMonitor.UNKNOWN);
			if (monitor.isCanceled()) {
				return Status.CANCEL_STATUS;