Project: Eclipse_Platform_UI
Bug 16153 NPE in EditorManager
Reported: 2002-05-16 10:50:54 | Status: resolved fixed

Eclipse 20020515 Windows 2000 Note: I tried this also in 0508 and the problem did not occur. I also tried it on 0515 with the SWT plugin from 0508 and it still happens. 1) start a brand new eclipse workspace 2) create a java project 3) create a file abc.doc in the project 4) create a file xyz.bmp in the project 5) click between the files - no exception 6) close eclipse 7) open eclipse - the first ole editor is displayed no problem 8) select the tab of the second ole editor get the following error: !ENTRY org.eclipse.ui 2 2 16/05/02 10:44 AM !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK 0 java.lang.NullPointerException at org.eclipse.ui.internal.EditorManager$7.run(EditorManager.java:815) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:802) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.EditorManager.busyRestoreEditor (EditorManager.java:768) at org.eclipse.ui.internal.EditorManager$6.run(EditorManager.java:758) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.restoreEditor (EditorManager.java:754) at org.eclipse.ui.internal.EditorManager$Editor.getEditor (EditorManager.java:1117) at org.eclipse.ui.internal.EditorManager$Editor.getPart (EditorManager.java:1110) at org.eclipse.ui.internal.PartPane.requestActivation(PartPane.java:332) at org.eclipse.ui.internal.EditorPane.requestActivation (EditorPane.java:129) at org.eclipse.ui.internal.PartPane.setFocus(PartPane.java:350) at org.eclipse.ui.internal.EditorWorkbook$2.widgetSelected (EditorWorkbook.java:140) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:1642) at org.eclipse.swt.custom.CTabFolder.onMouseDown(CTabFolder.java:1759) at org.eclipse.swt.custom.CTabFolder.access$4(CTabFolder.java:1756) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:194) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1120) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1103) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:450) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:176) at org.eclipse.core.launcher.Main.run(Main.java:614) at org.eclipse.core.launcher.Main.main(Main.java:451) !ENTRY org.eclipse.ui 2 2 16/05/02 10:44 AM !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK 0 org.eclipse.swt.SWTException: Graphic is disposed at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.graphics.Image.getBounds(Image.java:1006) at org.eclipse.swt.custom.CTabItem.preferredHeight(CTabItem.java:391) at org.eclipse.swt.custom.CTabFolder.getTabHeight(CTabFolder.java:648) at org.eclipse.swt.custom.CTabFolder.drawBorder(CTabFolder.java:606) at org.eclipse.swt.custom.CTabFolder.onPaint(CTabFolder.java:1098) at org.eclipse.swt.custom.CTabFolder.access$1(CTabFolder.java:1066) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:191) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:841) at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:655) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.RedrawWindow(Native Method) at org.eclipse.swt.widgets.Control.update(Control.java:2589) at org.eclipse.ui.internal.EditorWorkbook.drawGradient (EditorWorkbook.java:342) at org.eclipse.ui.internal.EditorWorkbook.setActiveState (EditorWorkbook.java:721) at org.eclipse.ui.internal.EditorWorkbook.tabFocusShow (EditorWorkbook.java:796) at org.eclipse.ui.internal.EditorArea.setActiveWorkbook (EditorArea.java:280) at org.eclipse.ui.internal.EditorWorkbook.becomeActiveWorkbook (EditorWorkbook.java:102) at org.eclipse.ui.internal.EditorPane.showFocus(EditorPane.java:155) at org.eclipse.ui.internal.WorkbenchPage$2.run(WorkbenchPage.java:346) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:802) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.WorkbenchPage.activatePart (WorkbenchPage.java:341) at org.eclipse.ui.internal.WorkbenchPage.setActivePart (WorkbenchPage.java:1984) at org.eclipse.ui.internal.WorkbenchPage.requestActivation (WorkbenchPage.java:1775) at org.eclipse.ui.internal.PartPane.requestActivation(PartPane.java:332) at org.eclipse.ui.internal.EditorPane.requestActivation (EditorPane.java:129) at org.eclipse.ui.internal.PartPane.setFocus(PartPane.java:350) at org.eclipse.ui.internal.EditorWorkbook$2.widgetSelected (EditorWorkbook.java:140) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:1642) at org.eclipse.swt.custom.CTabFolder.onMouseDown(CTabFolder.java:1759) at org.eclipse.swt.custom.CTabFolder.access$4(CTabFolder.java:1756) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:194) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1120) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1103) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:450) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:176) at org.eclipse.core.launcher.Main.run(Main.java:614) at org.eclipse.core.launcher.Main.main(Main.java:451)

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