Project: Eclipse_Platform_UI
Bug 221222 WorkbenchStatusDialog assumes that the WorkbenchWindow is open
Reported: 2008-03-03 15:58:05 | Status: verified fixed

The WorkbenchStatusDialog assumes that the shell sent to it by ProgressManagerUtil#getDefaultParent() is not null (which is is specc'ed to be if there is no parent). As a result opening the dialog on startup will result in the following error: !ENTRY org.eclipse.ui 4 0 2008-03-03 16:01:00.341 !MESSAGE Error occurred during status handling !STACK 0 java.lang.NullPointerException at org.eclipse.ui.statushandlers.WorkbenchStatusDialog.prepareImages(WorkbenchStatusDialog.java:478) at org.eclipse.ui.statushandlers.WorkbenchStatusDialog.<init>(WorkbenchStatusDialog.java:463) at org.eclipse.ui.statushandlers.WorkbenchStatusDialog.<init>(WorkbenchStatusDialog.java:499) at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.initStatusDialog(WorkbenchErrorHandler.java:114) at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.getStatusDialog(WorkbenchErrorHandler.java:81) at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.handle(WorkbenchErrorHandler.java:63) at org.eclipse.ui.internal.ide.IDEWorkbenchErrorHandler.handle(IDEWorkbenchErrorHandler.java:93) at org.eclipse.ui.internal.WorkbenchErrorHandlerProxy.handle(WorkbenchErrorHandlerProxy.java:36) at org.eclipse.ui.tests.statushandlers.TestStatusHandler.handle(TestStatusHandler.java:47) at org.eclipse.ui.statushandlers.StatusManager.handle(StatusManager.java:181) at org.eclipse.ui.internal.JFaceUtil$3.show(JFaceUtil.java:69) at org.eclipse.jface.util.SafeRunnable.handleException(SafeRunnable.java:67) at org.eclipse.ui.internal.Workbench$46.handle(Workbench.java:1946) at org.eclipse.ui.internal.Workbench$46.access$0(Workbench.java:1945) at org.eclipse.ui.internal.Workbench$48.runWithException(Workbench.java:1936) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:130) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3749) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3374) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:801) at org.eclipse.ui.internal.Workbench$26.runWithException(Workbench.java:1368) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:130) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3749) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3374) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2283) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2193) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:476) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:471) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:107) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:77) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:362) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175) 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:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) at org.eclipse.equinox.launcher.Main.main(Main.java:1212)

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IWorkbenchGraphicConstants.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchImages.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/WorkbenchStatusDialog.java