Project: Eclipse_Platform_UI
Bug 115761 [Undo] NPE in OperationHistoryActionHandler
Reported: 2005-11-10 02:29:56 | Status: verified fixed

This can happen during the shutdown of the workbench window. It happens because of the reference to the window after it's gone to get the history. This is all done in an async task which might run once the window is gone. It's only annoying because it makes scary looking messages in the log. I have a headless test suite that makes this happen at will, as it creates/destroys workbench windows with each test case. Caused by: java.lang.NullPointerException at org.eclipse.ui.operations.OperationHistoryActionHandler.getHistory(OperationHistoryActionHandler.java:227) at org.eclipse.ui.operations.RedoActionHandler.flush(RedoActionHandler.java:51) at org.eclipse.ui.operations.OperationHistoryActionHandler$2.run(OperationHistoryActionHandler.java:140) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) ... 58 more

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