Bug 120532 [Markers] SWTError in TaskView on shutdown
I20051212-0010-linux-gtk On shutdown, I got the following exception in the log. I assume TaskView is the "Problems" view. Unhandled event loop exception during blocked modal context. org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:3283) at org.eclipse.swt.SWT.error(SWT.java:3206) at org.eclipse.swt.SWT.error(SWT.java:3177) at org.eclipse.swt.widgets.Widget.error(Widget.java:426) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:364) at org.eclipse.swt.widgets.Tree.getSelection(Tree.java:1312) at org.eclipse.jface.viewers.TreeViewer.getSelection(TreeViewer.java:415) at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:608) at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:1631) at org.eclipse.jface.viewers.StructuredViewer.setSelectionToWidget(StructuredViewer.java:1494) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1208) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1289) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1246) at org.eclipse.ui.views.markers.internal.MarkerView$UpdateJob.runInUIThread(MarkerView.java:170) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:93) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3038) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2746) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:156) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:317) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:453) at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:261) at org.eclipse.ui.internal.ide.IDEWorkbenchAdvisor.disconnectFromWorkspace(IDEWorkbenchAdvisor.java:283) at org.eclipse.ui.internal.ide.IDEWorkbenchAdvisor.postShutdown(IDEWorkbenchAdvisor.java:206) at org.eclipse.ui.internal.Workbench.shutdown(Workbench.java:2061) at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:627) at org.eclipse.ui.internal.Workbench.access$8(Workbench.java:553) at org.eclipse.ui.internal.Workbench$12.run(Workbench.java:744) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.internal.Workbench.close(Workbench.java:742) at org.eclipse.ui.internal.Workbench.close(Workbench.java:717) at org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:646) at org.eclipse.ui.internal.WorkbenchWindow.access$0(WorkbenchWindow.java:630) at org.eclipse.ui.internal.WorkbenchWindow$2.run(WorkbenchWindow.java:731) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:729) at org.eclipse.jface.window.Window.handleShellCloseEvent(Window.java:726) at org.eclipse.jface.window.Window$3.shellClosed(Window.java:673) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:159) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066) at org.eclipse.swt.widgets.Shell.closeWidget(Shell.java:503) at org.eclipse.swt.widgets.Shell.gtk_delete_event(Shell.java:830) at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1394) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3698) at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method) at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:5018) at org.eclipse.swt.widgets.Display.eventProc(Display.java:1062) at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method) at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1344) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2741) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1763) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1727) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:396) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:109) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:379) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338) at org.eclipse.core.launcher.Main.basicRun(Main.java:282) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952) Unhandled event loop exception during blocked modal context. org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:3283) at org.eclipse.swt.SWT.error(SWT.java:3206) at org.eclipse.swt.SWT.error(SWT.java:3177) at org.eclipse.swt.widgets.Widget.error(Widget.java:426) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:364) at org.eclipse.swt.widgets.Tree.getSelection(Tree.java:1312) at org.eclipse.jface.viewers.TreeViewer.getSelection(TreeViewer.java:415) at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:608) at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:1631) at org.eclipse.jface.viewers.StructuredViewer.setSelectionToWidget(StructuredViewer.java:1494) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1208) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1289) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1246) at org.eclipse.ui.views.markers.internal.MarkerView$UpdateJob.runInUIThread(MarkerView.java:170) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:93) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3038) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2746) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:156) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:317) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:453) at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:261) at org.eclipse.ui.internal.ide.IDEWorkbenchAdvisor.disconnectFromWorkspace(IDEWorkbenchAdvisor.java:283) at org.eclipse.ui.internal.ide.IDEWorkbenchAdvisor.postShutdown(IDEWorkbenchAdvisor.java:206) at org.eclipse.ui.internal.Workbench.shutdown(Workbench.java:2061) at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:627) at org.eclipse.ui.internal.Workbench.access$8(Workbench.java:553) at org.eclipse.ui.internal.Workbench$12.run(Workbench.java:744) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.internal.Workbench.close(Workbench.java:742) at org.eclipse.ui.internal.Workbench.close(Workbench.java:717) at org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:646) at org.eclipse.ui.internal.WorkbenchWindow.access$0(WorkbenchWindow.java:630) at org.eclipse.ui.internal.WorkbenchWindow$2.run(WorkbenchWindow.java:731) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:729) at org.eclipse.jface.window.Window.handleShellCloseEvent(Window.java:726) at org.eclipse.jface.window.Window$3.shellClosed(Window.java:673) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:159) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066) at org.eclipse.swt.widgets.Shell.closeWidget(Shell.java:503) at org.eclipse.swt.widgets.Shell.gtk_delete_event(Shell.java:830) at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1394) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3698) at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method) at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:5018) at org.eclipse.swt.widgets.Display.eventProc(Display.java:1062) at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method) at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1344) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2741) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1763) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1727) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:396) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:109) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:379) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338) at org.eclipse.core.launcher.Main.basicRun(Main.java:282) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerView.java
}
				pendingMarkerUpdates.clear();
			}
			pendingMarkerUpdates.clear();
			return Status.OK_STATUS;
		}
		/*
		 * (non-Javadoc)
		 * 
		 * @see org.eclipse.ui.progress.WorkbenchJob#shouldRun()
		 */
		public boolean shouldRun() {
			return buildDone;
		}
	}
	private UpdateJob updateJob = new UpdateJob();
	
	
	private int preBusyMarkers = 0;
	protected Object[] focusElements;
	private Clipboard clipboard;
	IResourceChangeListener markerUpdateListener = new IResourceChangeListener() {
		/*
		 * (non-Javadoc)
		 * 
		 * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
		 */
		public void resourceChanged(IResourceChangeEvent event) {
			String[] markerTypes = getMarkerTypes();
			Collection changedMarkers = new ArrayList();