Project: Eclipse_Platform_UI
Bug 15854 NullPointerException in Editors Workbook
Reported: 2002-05-13 11:36:09 | Status: resolved fixed

The following scenario consistently creates a null pointer exception: Create a new project, with two text files under it. Open both files and doc them in separate tab folders side by side. Give the first file focus, and then close the second file. From the explorer view, double click and try to open the second file (or any other file). The following error is logged: <?xml version="1.0" encoding="UTF-8"?> <log> <log-entry date="Mon May 13 11:26:52 EDT 2002"> <status plugin-id="org.eclipse.ui" severity="WARNING" message="Problems occurred when invoking code from plug-in: org.eclipse.ui." code="2"> <exception message="null" trace=" java.lang.NullPointerException at org.eclipse.ui.internal.EditorWorkbook.getTabList (EditorWorkbook.java:443) at org.eclipse.ui.internal.EditorArea.updateTabList(EditorArea.java:299) at org.eclipse.ui.internal.EditorArea.setActiveWorkbook (EditorArea.java:274) at org.eclipse.ui.internal.EditorWorkbook.becomeActiveWorkbook (EditorWorkbook.java:100) at org.eclipse.ui.internal.EditorPane.showFocus(EditorPane.java:139) at org.eclipse.ui.internal.WorkbenchPage$2.run(WorkbenchPage.java:351) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:838) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.WorkbenchPage.activatePart (WorkbenchPage.java:346) at org.eclipse.ui.internal.WorkbenchPage.setActivePart (WorkbenchPage.java:1877) at org.eclipse.ui.internal.WorkbenchPage.activate (WorkbenchPage.java:335) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1571) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1468) at org.eclipse.ui.actions.OpenFileAction.openFile (OpenFileAction.java:91) at org.eclipse.ui.actions.OpenSystemEditorAction.run (OpenSystemEditorAction.java:91) at org.eclipse.ui.views.navigator.OpenActionGroup.runDefaultAction (OpenActionGroup.java:102) at org.eclipse.ui.views.navigator.ResourceNavigatorActionGroup.runDefaultAction (ResourceNavigatorActionGroup.java:152) at org.eclipse.ui.views.navigator.ResourceNavigator.handleOpen (ResourceNavigator.java:438) at org.eclipse.ui.views.navigator.ResourceNavigator$6.open (ResourceNavigator.java:244) at org.eclipse.jface.viewers.StructuredViewer.fireOpen (StructuredViewer.java:300) at org.eclipse.jface.viewers.StructuredViewer.handleOpen (StructuredViewer.java:460) at org.eclipse.jface.viewers.AbstractTreeViewer$2.handleOpen (AbstractTreeViewer.java:633) at org.eclipse.jface.util.OpenStrategy.handleOpen(OpenStrategy.java:134) at org.eclipse.jface.util.OpenStrategy.access$5(OpenStrategy.java:131) at org.eclipse.jface.util.OpenStrategy$8.handleEvent (OpenStrategy.java:299) at org.eclipse.jface.util.OpenStrategy$1.handleEvent (OpenStrategy.java:115) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1412) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1208) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:836) at org.eclipse.ui.internal.Workbench.run(Workbench.java:819) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:190) at org.eclipse.core.launcher.Main.run(Main.java:549) at org.eclipse.core.launcher.Main.main(Main.java:390) "> </exception> </status> </log-entry>

Files changed in fix:
bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/EditorWorkbook.java