Community
Participate
Working Groups
In I20050323-1615 on WinXP any way I attempt to open the problems view I get the view with "cool" unable to create view embedded in the view and lists the following stack trace: java.lang.NullPointerException at org.eclipse.ui.ide.ResourceUtil.getFile(ResourceUtil.java:43) at org.eclipse.ui.views.markers.internal.MarkerView.focusSelectionChanged (MarkerView.java:578) at org.eclipse.ui.views.markers.internal.MarkerView.createPartControl (MarkerView.java:314) at org.eclipse.ui.internal.ViewFactory.busyRestoreViewHelper (ViewFactory.java:429) at org.eclipse.ui.internal.ViewFactory.busyRestoreView (ViewFactory.java:299) at org.eclipse.ui.internal.ViewFactory$1.run(ViewFactory.java:697) at org.eclipse.swt.custom.BusyIndicator.showWhile (BusyIndicator.java:69) at org.eclipse.ui.internal.ViewFactory.restoreView (ViewFactory.java:694) at org.eclipse.ui.internal.ViewFactory$ViewReference.getPart (ViewFactory.java:119) at org.eclipse.ui.internal.WorkbenchPage$ActivationList.getActive (WorkbenchPage.java:3426) at org.eclipse.ui.internal.WorkbenchPage$ActivationList.getActive (WorkbenchPage.java:3407) at org.eclipse.ui.internal.WorkbenchPage.closeEditor (WorkbenchPage.java:1113) at org.eclipse.ui.internal.WorkbenchPage.closeEditor (WorkbenchPage.java:1057) at org.eclipse.ui.internal.EditorPane.doHide(EditorPane.java:116) at org.eclipse.ui.internal.PartStack.close(PartStack.java:465) at org.eclipse.ui.internal.EditorStack.close(EditorStack.java:208) at org.eclipse.ui.internal.PartStack$1.close(PartStack.java:98) at org.eclipse.ui.internal.presentations.newapi.TabbedStackPresentation$1.handleEv ent(TabbedStackPresentation.java:81) at org.eclipse.ui.internal.presentations.newapi.AbstractTabFolder.fireEvent (AbstractTabFolder.java:263) at org.eclipse.ui.internal.presentations.newapi.AbstractTabFolder.fireEvent (AbstractTabFolder.java:272) at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.acce ss$1(DefaultTabFolder.java:1) at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder$1.cl oseButtonPressed(DefaultTabFolder.java:64) at org.eclipse.ui.internal.presentations.PaneFolder.notifyCloseListeners (PaneFolder.java:546) at org.eclipse.ui.internal.presentations.PaneFolder$3.close (PaneFolder.java:190) at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:2078) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:291) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2894) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2527) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1571) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1535) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:312) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run (IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:228) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:338) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:151) 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:324) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:268) at org.eclipse.core.launcher.Main.basicRun(Main.java:260) at org.eclipse.core.launcher.Main.run(Main.java:887) at org.eclipse.core.launcher.Main.main(Main.java:871)
It appears that the active editor was returning null as its IEditorInput. This is a bug in the editor, not the problem view... however, the problem view only became sensitive to this type of thing as a result of bug 87288. I've added a paranoia check for null editor inputs, so the problems view is once again protected from buggy editors... However, the real problem is the editor with the bogus input and it's hard to address that without knowing what editor was active at the time. I'm reassigning this to JDT on the general assumption that you had a java editor active at the time... but about the best anyone can do is double-check that there's no obvious way for getEditorInput() to return null and close this as WORKSFORME if they don't find anything. If you notice this again, please indicate what editor had focus at the time the exception was thrown.
I've added a check for a non-null editor input at creation time. The workbench will now refuse to create an editor if the editor input is null at creation time. Hopefully this will help catch the culprit.
getEditorInput() can return null after the editor has been disposed. But then it shouldn't be firing selection changed events. This could happen if the selection service got a part activation after the part had been disposed. But that shouldn't happen either.
Darin, which editor was active? If an editor is open and active the input should not be null. Do you have steps to reproduce?
no steps to reproduce.
I suspect the null result from getEditorInput() is due to bug 89246.
Get rid of deprecated state.
.