Community
Participate
Working Groups
Build: I20061031-0656 1) Open the sync view with several outgoing changes 2) Click on several files in succession so that the compare editor gets reused 3) Close the compare editor 4) Hit Alt+Back arrow to go back in the navigation history An error occurs reopening the compare editor: java.lang.NullPointerException at org.eclipse.compare.CompareConfiguration.getImage(CompareConfiguration.java:266) at org.eclipse.compare.contentmergeviewer.TextMergeViewer$Diff.getImage(TextMergeViewer.java:965) at org.eclipse.compare.contentmergeviewer.TextMergeViewer.updateControls(TextMergeViewer.java:3273) at org.eclipse.compare.contentmergeviewer.TextMergeViewer.setCurrentDiff(TextMergeViewer.java:4276) at org.eclipse.compare.contentmergeviewer.TextMergeViewer.selectFirstDiff(TextMergeViewer.java:3643) at org.eclipse.compare.contentmergeviewer.TextMergeViewer.updateContent(TextMergeViewer.java:2331) at org.eclipse.compare.contentmergeviewer.ContentMergeViewer.internalRefresh(ContentMergeViewer.java:701) at org.eclipse.compare.contentmergeviewer.ContentMergeViewer.inputChanged(ContentMergeViewer.java:603) at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:250) at org.eclipse.jdt.internal.ui.compare.JavaMergeViewer.setInput(JavaMergeViewer.java:134) at org.eclipse.compare.CompareViewerSwitchingPane.setInput(CompareViewerSwitchingPane.java:300) at org.eclipse.compare.CompareEditorInput$12.run(CompareEditorInput.java:582) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.compare.CompareEditorInput.feed1(CompareEditorInput.java:577) at org.eclipse.compare.CompareEditorInput.feedInput(CompareEditorInput.java:572) at org.eclipse.compare.CompareEditorInput.createContents(CompareEditorInput.java:424) at org.eclipse.compare.internal.CompareEditor.createPartControl(CompareEditor.java:191) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:596) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:372) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566) at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:214) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2571) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2504) at org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPage.java:2496) at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2481) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2476) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2461) at org.eclipse.ui.internal.NavigationHistoryEntry.restoreLocation(NavigationHistoryEntry.java:66) at org.eclipse.ui.internal.NavigationHistory.gotoEntry(NavigationHistory.java:398) at org.eclipse.ui.internal.NavigationHistory.shiftEntry(NavigationHistory.java:449) at org.eclipse.ui.internal.NavigationHistory.backward(NavigationHistory.java:433) at org.eclipse.ui.internal.NavigationHistoryAction.run(NavigationHistoryAction.java:201) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:119) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:461) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:424) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:160) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:465) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:791) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:838) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:563) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:505) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:122) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1005) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:924) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:949) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:934) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:962) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:958) at org.eclipse.swt.widgets.Widget.wmSysKeyDown(Widget.java:2316) at org.eclipse.swt.widgets.Control.WM_SYSKEYDOWN(Control.java:4125) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3443) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4145) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1989) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3075) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1924) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1888) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:348) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:165) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:341) at org.eclipse.core.launcher.Main.basicRun(Main.java:285) at org.eclipse.core.launcher.Main.run(Main.java:987) at org.eclipse.core.launcher.Main.main(Main.java:962)
Is this is Vista specific problem?
This bug is not Vista specific.
This is a bug in the workbench. The CompareEditorInput returns false in the exists method to indicate that the editor should not appear in the Editor MRU list after the editor is closed. But when a compare editor is reused (i.e. opening several files from the sync view reuses the same editor) and then closed, this seems to throw off the list so that the compare editor stays in there even though it has been closed. Reopening the editor then causes an NPE since the editor was not designed to be reopened (more specifically, the editor input was not designed to be reopened).
As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009
Remy is now responsible for watching the [EditorMgmt] component area.
Bug 295046 is very similar to this one, maybe even a duplicate. I've just moved it to Platform/UI.
*** Bug 295046 has been marked as a duplicate of this bug. ***
> The CompareEditorInput returns false in the exists method This is not the point but it returns false in CompareEditorInput.getPersistable(). This is a general issue of the navigation history in combination with reusing editors on non-persistable input: since the history only stores the editor ID and editor input, it cannot handle this case correctly. The NavigationHistoryEditorInfo should have a reference to the editor as long as the editor is open.
Some shuffling around but back to me it seems.
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. -- The automated Eclipse Genie.
(In reply to Dani Megert from comment #8) > This is a general issue of the navigation history in combination with > reusing editors on non-persistable input: since the history only stores the > editor ID and editor input, it cannot handle this case correctly. The > NavigationHistoryEditorInfo should have a reference to the editor as long as > the editor is open. I experience frequently that the navigation history is not correct. Super annoying.
*** Bug 413505 has been marked as a duplicate of this bug. ***
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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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. -- The automated Eclipse Genie.