Community
Participate
Working Groups
Build: 4.1 M2 When I attempted to start this build on an existing workspace, I got this NPE: Caused by: java.lang.NullPointerException at org.eclipse.ui.internal.WorkbenchPage.checkEditor(WorkbenchPage.java:1558) at org.eclipse.ui.internal.WorkbenchPage.findEditors(WorkbenchPage.java:1530) at org.eclipse.ui.internal.WorkbenchPage.findEditor(WorkbenchPage.java:1514) at org.eclipse.ui.NavigationLocation.getEditorPart(NavigationLocation.java:44) at org.eclipse.ui.NavigationLocation.getText(NavigationLocation.java:60) After that, attempting to open any view via Quick Access results in more errors: java.lang.NullPointerException at org.eclipse.ui.internal.EditorReference.getId(EditorReference.java:115) at org.eclipse.ui.internal.quickaccess.EditorElement.getId(EditorElement.java:49) at org.eclipse.ui.internal.quickaccess.EditorProvider.getElements(EditorProvider.java:48) at org.eclipse.ui.internal.quickaccess.QuickAccessProvider.getElementsSorted(QuickAccessProvider.java:56) at org.eclipse.ui.internal.quickaccess.QuickAccessContents.computeMatchingEntries(QuickAccessContents.java:228) at org.eclipse.ui.internal.quickaccess.QuickAccessContents.refresh(QuickAccessContents.java:107) at org.eclipse.ui.internal.quickaccess.QuickAccessContents.access$1(QuickAccessContents.java:101) at org.eclipse.ui.internal.quickaccess.QuickAccessContents$4$1.run(QuickAccessContents.java:419) at org.eclipse.swt.widgets.Display.runTimer(Display.java:4167) This build seems unusable to me.
Created attachment 179653 [details] Complete log file from the session
I talked to John and there appears to be two different problems with the layout of his workspace we were trying to restore. 1. There were editors opened that were no longer present in the new installation that was run on the workspace. This is the cause behind the NPEs. 2. Trying to click around some existent editors but which were opened on resources that no longer existed were causing more NPEs to be thrown. I suspect this to be a side-effect of 1 but I will investigate to make sure. The workaround is to just Ctrl+Shift+W and close all the editors. Eclipse should continue functioning as normal.
(In reply to comment #2) > 1. There were editors opened that were no longer present in the new > installation that was run on the workspace. This is the cause behind the NPEs. I only half-fixed this problem for non-restorable editors. The problem that John uncovered is for the cases where the non-restorable editor hasn't actually ever been clicked on. As parts are restored lazily, we haven't tried restoring them so the editor descriptors haven't been swapped out for the error one, causing NPEs to be thrown.
Fixed in CVS HEAD. Asking IEditorReferences for their ids should no longer cause an NPE if the editor does not exist in the installation.