Community
Participate
Working Groups
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)
Created attachment 91440 [details] Workbench changes to call status management on startup From Bug 218360 Steps 1) Load platfror-ui and platform-ui-tests 2) Apply patch 3) Self host
Szymon, could you assign this bug to me?
Tod, What actually should StatusDialog do in this case? Log status? Try to display it anyway?
This is part of a general issue of what to do on startup. Shutting down without telling the user why is not really very good - I think it should try and display it regardless.
Created attachment 91847 [details] Fix (incorporates changes for bug 221493)
Me too review
Krystof this patch does not apply against HEAD. Could you update it please?
Created attachment 92661 [details] Patch proposition
I just looked at this and noticed that WorkbenchStatusDialog does not subclass the JFace Dialog where a lot of this sort of thing is worked out for you. I think making it a subclass of Dialog and calling super so that you get the advantage of shell providers and a consistent look and feel should be the first step.
This will likely be cleared up by a fix to Bug 222947.
Created attachment 92755 [details] Another patch Now I think it looks much better - I have removed almost all dependencies to the passed parent Shell and delegated preparing image to the internal dialog.
The patch is fine except for managing the Image yourself - it should be managed by the workbench images. I have updated it and released the changes for build >20080318
Verified in I20080327-0100 by code inspection
*** Bug 222145 has been marked as a duplicate of this bug. ***