Project: Eclipse_Platform_UI
Bug 105776 [Progress] Clients of ProgressMonitorFocusJobDialog.runAsync can can cause widget disposed error
Reported: 2005-08-02 08:35:27 | Status: verified fixed

I20050726-1222 Callers of ProgressMonitorFocusJobDialog.runAsync need to check whether the widget(s) they use are still there. We sometimes get the following stack trace when running one of our tests: org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:2942) at org.eclipse.swt.SWT.error(SWT.java:2865) at org.eclipse.swt.SWT.error(SWT.java:2836) at org.eclipse.swt.widgets.Widget.error(Widget.java:416) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:352) at org.eclipse.swt.widgets.Label.setImage(Label.java:464) at org.eclipse.jface.dialogs.ProgressMonitorDialog.updateForClearBlocked(ProgressMonitorDialog.java:256) at org.eclipse.jface.dialogs.ProgressMonitorDialog$ProgressMonitor.clearBlocked(ProgressMonitorDialog.java:237) at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog$3.clearBlocked(ProgressMonitorJobsDialog.java:424) at org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDialog$6.run(ProgressMonitorFocusJobDialog.java:191) 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:2840) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2571) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:153) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:303) 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.progress.ProgressManager$3.run(ProgressManager.java:863) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:897) at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:873) at org.eclipse.jdt.internal.junit.util.TestSearchEngine.findTests(TestSearchEngine.java:134) at org.eclipse.jdt.internal.junit.launcher.JUnitLaunchShortcut.launchType(JUnitLaunchShortcut.java:113) at org.eclipse.jdt.internal.junit.launcher.JUnitLaunchShortcut.searchAndLaunch(JUnitLaunchShortcut.java:103) at org.eclipse.jdt.internal.junit.launcher.JUnitLaunchShortcut.launch(JUnitLaunchShortcut.java:78) at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.launch(LaunchShortcutExtension.java:372) at org.eclipse.jdt.junit.tests.WrappingSystemTest.launchTests(WrappingSystemTest.java:169) at org.eclipse.jdt.junit.tests.WrappingSystemTest.runTests(WrappingSystemTest.java:118) at org.eclipse.jdt.junit.tests.WrappingSystemTest.test01shouldWrapSecondLine(WrappingSystemTest.java:70) 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:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22) at junit.extensions.TestSetup$1.protect(TestSetup.java:19) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.extensions.TestSetup.run(TestSetup.java:23) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:57) at org.eclipse.pde.internal.junit.runtime.UITestApplication$1.run(UITestApplication.java:99) 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:2840) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2571) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.pde.internal.junit.runtime.UITestApplication.run(UITestApplication.java:39) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163) 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:324) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334) at org.eclipse.core.launcher.Main.basicRun(Main.java:278) at org.eclipse.core.launcher.Main.run(Main.java:973) at org.eclipse.core.launcher.Main.main(Main.java:948)

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressMonitorFocusJobDialog.java