Project: Eclipse_Platform_UI
Bug 116673 [Undo] Workbench still running after NullPointerException in OperationHistoryActionHandler
Reported: 2005-11-16 10:50:32 | Status: verified fixed

I've wrapped the org.eclipse.wst.javascript.ui.internal.editor.JSEditor class in a Composite so that it can be placed like a normal Control in views and dialogs. I currently have this editor Control in a simple view, it's the only thing in the view. If I edit the text in the editor, when I close the Workbench I get the exception included below (it's repeated about 20 times in the console). After the exception the Workbench UI is closed, but the javaw.exe process is still running and another workbench cannot be opened until that process is killed. This did not happen in 3.0. If the view containing my editor control is closed before the workbench, there are no problems. I don't know if this is a problem with the new Undo/Redo mechanisms or the WST code or my code, but the code throwing the NullPointerException was added in 3.1. Nov 16, 2005 10:37:49 AM org.eclipse.ui Unspecified Method SEVERE: Failed to execute runnable (java.lang.NullPointerException) org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:2942) at org.eclipse.swt.SWT.error(SWT.java:2865) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:126) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3057) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2716) 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.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:85) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) 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) Caused by: java.lang.NullPointerException at org.eclipse.ui.operations.OperationHistoryActionHandler.getHistory (OperationHistoryActionHandler.java:227) at org.eclipse.ui.operations.RedoActionHandler.shouldBeEnabled (RedoActionHandler.java:71) at org.eclipse.ui.operations.OperationHistoryActionHandler.update (OperationHistoryActionHandler.java:352) at org.eclipse.ui.operations.OperationHistoryActionHandler$1.run (OperationHistoryActionHandler.java:129) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:123) ... 19 more

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/operations/OperationHistoryActionHandler.java