Summary: | RSE causing SWT "Widget is disposed" exceptions on platform shutdown | ||||||
---|---|---|---|---|---|---|---|
Product: | [Tools] Target Management | Reporter: | Uwe Stieber <uwe.st> | ||||
Component: | RSE | Assignee: | Martin Oberhuber <mober.at+eclipse> | ||||
Status: | RESOLVED FIXED | QA Contact: | Martin Oberhuber <mober.at+eclipse> | ||||
Severity: | minor | ||||||
Priority: | P2 | CC: | dmcknigh, wb-rel | ||||
Version: | 2.0 | Flags: | dmcknigh:
review+
|
||||
Target Milestone: | 2.0.1 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Uwe Stieber
2007-04-19 09:41:09 EDT
Uwe - shouldn't this particular one be resolved with your SafeTreeViewer contribution? No. SystemView, line 3244 is calling a method of the tree widget directly, so SafeTreeViewer cannot kick in. Seen similar exceptions during workbench shutdown from smartRefresh() ... getViewAdapter() ... getInputProvider() ... SystemView#getShell() See backtrace below. I was tempted to just fix the getShell() call, since we should get rid of passing the shell around anyways. But seeing that there are other exceptions in smartRefresh() during shutdown as well, I think we should try and avoid any SystemView refreshes when the Workbench is already shutting down. It might help to register as a SaveParticipant, so we know we're already shutting down. The issue is not severe, but since lots of people have been seeing these exceptions during workbench shutdown, it's a must-fix for 2.0.1 Exceptions: Caused by: org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:3563) at org.eclipse.swt.SWT.error(SWT.java:3481) at org.eclipse.swt.SWT.error(SWT.java:3452) at org.eclipse.swt.widgets.Widget.error(Widget.java:432) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:325) at org.eclipse.swt.widgets.Control.getShell(Control.java:1366) at org.eclipse.rse.internal.ui.view.SystemView.getShell(SystemView.java:1149) at org.eclipse.rse.internal.ui.view.SystemView.getInputProvider(SystemView.java:625) at org.eclipse.rse.internal.ui.view.SystemView.getViewAdapter(SystemView.java:1328) at org.eclipse.rse.internal.ui.view.SystemView.smartRefresh(SystemView.java:3518) at org.eclipse.rse.internal.ui.view.SystemView$ResourceChangedJob.runInUIThread(SystemView.java:2005) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:94) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) Unhandled event loop exception during blocked modal context. org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Widget is disposed) at org.eclipse.swt.SWT.error(SWT.java:3563) at org.eclipse.swt.SWT.error(SWT.java:3481) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:126) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:158) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:326) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:495) at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:268) at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.disconnectFromWorkspace(IDEWorkbenchAdvisor.java:396) at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.postShutdown(IDEWorkbenchAdvisor.java:313) at org.eclipse.ui.internal.Workbench.shutdown(Workbench.java:2702) Created attachment 78233 [details]
Patch to suppress "widget is disposed" during shutdown
Attached patch suppresses the "widget is disposed" exceptions when a refresh is requested while the tree is already disposed.
It's not a perfect safeguard though. Expanding a large remote file tree on a slow connection, and quitting eclipse immediately after, leads to 5-10 exceptions being printed due to IllegalState of bundles resolved -- I dont't think we can really fix this, but the patch should alleviate the problem for the most common cases.
Dave can you review this? Okay, this is much better than printing exceptions. Patch applied. |