Project: JDT
Bug 216136 [breadcrumb] NPE when closing editor
Reported: 2008-01-22 09:20:34 | Status: verified fixed

I20080115-1740 1. Open Java Editor 2. Disable Breadcrumb 3. Close Editor 4. Open Editor 5. Close Editor Is: java.lang.NullPointerException at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorBreadcrumb.dispose(JavaEditorBreadcrumb.java:402) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.dispose(JavaEditor.java:2571) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.dispose(CompilationUnitEditor.java:1445) at org.eclipse.ui.internal.WorkbenchPartReference.doDisposePart(WorkbenchPartReference.java:730) at org.eclipse.ui.internal.EditorReference.doDisposePart(EditorReference.java:302) at org.eclipse.ui.internal.WorkbenchPartReference.dispose(WorkbenchPartReference.java:681) at org.eclipse.ui.internal.WorkbenchPage.disposePart(WorkbenchPage.java:1586) at org.eclipse.ui.internal.WorkbenchPage.handleDeferredEvents(WorkbenchPage.java:1345) at org.eclipse.ui.internal.WorkbenchPage.deferUpdates(WorkbenchPage.java:1329) at org.eclipse.ui.internal.WorkbenchPage.closeEditors(WorkbenchPage.java:1303) at org.eclipse.ui.internal.WorkbenchPage.closeEditor(WorkbenchPage.java:1358) at org.eclipse.ui.internal.EditorPane.doHide(EditorPane.java:61) at org.eclipse.ui.internal.PartStack.close(PartStack.java:543) at org.eclipse.ui.internal.EditorStack.close(EditorStack.java:206) at org.eclipse.ui.internal.PartStack$1.close(PartStack.java:122) at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation$1.handleEvent(TabbedStackPresentation.java:83) at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:267) at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:276) at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.access$1(DefaultTabFolder.java:1) at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder$1.closeButtonPressed(DefaultTabFolder.java:67) at org.eclipse.ui.internal.presentations.PaneFolder.notifyCloseListeners(PaneFolder.java:628) at org.eclipse.ui.internal.presentations.PaneFolder$3.close(PaneFolder.java:207) at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:2165) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:320) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3758) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3369) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2392) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2356) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2222) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:474) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:469) 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:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) 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:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:564) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1251) at org.eclipse.equinox.launcher.Main.main(Main.java:1227) at org.eclipse.core.launcher.Main.main(Main.java:30) !ENTRY org.eclipse.ui.workbench 4 2 2008-01-22 15:17:52.314 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench". !STACK 0 org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:3716) at org.eclipse.swt.SWT.error(SWT.java:3634) at org.eclipse.swt.SWT.error(SWT.java:3605) at org.eclipse.swt.widgets.Widget.error(Widget.java:441) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:334) at org.eclipse.swt.widgets.Composite.getChildren(Composite.java:410) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.showBreadcrumb(JavaEditor.java:1853) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.handlePreferenceStoreChanged(JavaEditor.java:2755) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.handlePreferenceStoreChanged(CompilationUnitEditor.java:1567) at org.eclipse.ui.texteditor.AbstractTextEditor$PropertyChangeListener.propertyChange(AbstractTextEditor.java:664) at org.eclipse.ui.texteditor.ChainedPreferenceStore.firePropertyChangeEvent(ChainedPreferenceStore.java:164) at org.eclipse.ui.texteditor.ChainedPreferenceStore.handlePropertyChangeEvent(ChainedPreferenceStore.java:431) at org.eclipse.ui.texteditor.ChainedPreferenceStore.access$0(ChainedPreferenceStore.java:408) at org.eclipse.ui.texteditor.ChainedPreferenceStore$PropertyChangeListener.propertyChange(ChainedPreferenceStore.java:69) at org.eclipse.ui.preferences.ScopedPreferenceStore$3.run(ScopedPreferenceStore.java:376) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.ui.preferences.ScopedPreferenceStore.firePropertyChangeEvent(ScopedPreferenceStore.java:373) at org.eclipse.ui.preferences.ScopedPreferenceStore.setValue(ScopedPreferenceStore.java:819) at org.eclipse.jdt.internal.ui.javaeditor.ToggleBreadcrumbAction.run(ToggleBreadcrumbAction.java:51) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetAction.java:229) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:234) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:582) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:499) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:451) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3758) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3369) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2392) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2356) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2222) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:474) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:469) 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:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) 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:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:564) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1251) at org.eclipse.equinox.launcher.Main.main(Main.java:1227) at org.eclipse.core.launcher.Main.main(Main.java:30) 5. Enable breadcrumb Is: Error dialog with: org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:3716) at org.eclipse.swt.SWT.error(SWT.java:3634) at org.eclipse.swt.SWT.error(SWT.java:3605) at org.eclipse.swt.widgets.Widget.error(Widget.java:441) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:334) at org.eclipse.swt.widgets.Composite.getChildren(Composite.java:410) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.showBreadcrumb(JavaEditor.java:1853) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.handlePreferenceStoreChanged(JavaEditor.java:2755) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.handlePreferenceStoreChanged(CompilationUnitEditor.java:1567) at org.eclipse.ui.texteditor.AbstractTextEditor$PropertyChangeListener.propertyChange(AbstractTextEditor.java:664) at org.eclipse.ui.texteditor.ChainedPreferenceStore.firePropertyChangeEvent(ChainedPreferenceStore.java:164) at org.eclipse.ui.texteditor.ChainedPreferenceStore.handlePropertyChangeEvent(ChainedPreferenceStore.java:431) at org.eclipse.ui.texteditor.ChainedPreferenceStore.access$0(ChainedPreferenceStore.java:408) at org.eclipse.ui.texteditor.ChainedPreferenceStore$PropertyChangeListener.propertyChange(ChainedPreferenceStore.java:69) at org.eclipse.ui.preferences.ScopedPreferenceStore$3.run(ScopedPreferenceStore.java:376) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.ui.preferences.ScopedPreferenceStore.firePropertyChangeEvent(ScopedPreferenceStore.java:373) at org.eclipse.ui.preferences.ScopedPreferenceStore.setValue(ScopedPreferenceStore.java:819) at org.eclipse.jdt.internal.ui.javaeditor.ToggleBreadcrumbAction.run(ToggleBreadcrumbAction.java:51) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetAction.java:229) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:234) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:582) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:499) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:451) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3758) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3369) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2392) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2356) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2222) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:474) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:469) 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:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) 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:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:564) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1251) at org.eclipse.equinox.launcher.Main.main(Main.java:1227) at org.eclipse.core.launcher.Main.main(Main.java:30)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorBreadcrumb.java