Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352144

Summary: NPE while closing compare editor
Product: [Eclipse Project] Platform Reporter: Benjamin Muskalla <b.muskalla>
Component: TeamAssignee: Platform Team Inbox <platform-team-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: dariusz.luksza, ed, remy.suen
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Benjamin Muskalla CLA 2011-07-14 13:25:46 EDT
What steps will reproduce the problem?
1. Have an open Compare Editor (java file, opened by in Git Synch View)
2. Click close
3. NPE happens, editor not closed


-- Error Details --
Date: Thu Jul 14 03:28:17 CEST 2011
Message: Unhandled event loop exception
Severity: Error
Product: Eclipse 1.4.0.20110609-1120 (org.eclipse.epp.package.rcp.product)
Plugin: org.eclipse.ui
Exception Stack Trace:
java.lang.NullPointerException
	at org.eclipse.team.internal.ui.synchronize.LocalResourceSaveableComparison.getName(LocalResourceSaveableComparison.java:250)
	at org.eclipse.ui.internal.SaveablesList.promptForSaving(SaveablesList.java:514)
	at org.eclipse.ui.internal.SaveablesList.promptForSavingIfNecessary(SaveablesList.java:433)
	at org.eclipse.ui.internal.SaveablesList.preCloseParts(SaveablesList.java:388)
	at org.eclipse.ui.internal.SaveablesList.preCloseParts(SaveablesList.java:347)
	at org.eclipse.ui.internal.WorkbenchPage.closeEditors(WorkbenchPage.java:1426)
	at org.eclipse.ui.internal.WorkbenchPage.closeEditor(WorkbenchPage.java:1514)
	at org.eclipse.ui.internal.EditorPane.doHide(EditorPane.java:61)
	at org.eclipse.ui.internal.PartStack.close(PartStack.java:537)
	at org.eclipse.ui.internal.EditorStack.close(EditorStack.java:206)
	at org.eclipse.ui.internal.PartStack$1.close(PartStack.java:120)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation$1.handleEvent(TabbedStackPresentation.java:83)
	at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:269)
	at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:278)
	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:71)
	at org.eclipse.ui.internal.presentations.PaneFolder.notifyCloseListeners(PaneFolder.java:631)
	at org.eclipse.ui.internal.presentations.PaneFolder$3.close(PaneFolder.java:206)
	at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1598)
	at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:261)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Comment 1 Dariusz Luksza CLA 2011-07-14 13:57:33 EDT
I cannot reproduce this bug. I've tried opening added, remove and changed files from both workspace and git change set presentations model and this NPE didn't occur. Can you provide mode detailed steps for reproducing this issue?
Comment 2 Ed Willink CLA 2011-07-24 12:59:32 EDT
I've got the same stack trace when  ttrying to do "Close Others" or File->Close All..

I too have EGit Compare in use, and since that is too buggy to even report bugs on, I guess EGit is the problem.

For instance, single clicking in the EGIT Tree Compare that only show the first of a multi-selection for compare, does nothing. Double clicking shows two compare editors, if don't re-use compare edirtor is selected. If re-use compare editor is selected you just wonder waht on eartyh is happening and desparately look for the missing context menu and toolbar icons.

Compare itself is significantly different to normal compare, so ...

Just tried closing some editors. One wouldn't close; same stack trace. It was dirty. Saved it, now closes. I suspect a dirty EGIT Compare may be the clue.
Comment 3 Lars Vogel CLA 2019-11-14 03:52:09 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.