Community
Participate
Working Groups
Build Identifier: 20100917-0705 I was editing my Ant build.xml file when Eclipse started to act odd. I then noticed a NullPointerException dialog. The following is the stack trace from my .log file: !ENTRY org.eclipse.ui.workbench 4 2 2010-10-13 12:38:28.982 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench". !STACK 0 java.lang.NullPointerException at org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart.getDocument(XMLMultiPageEditorPart.java:897) at org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart.access$0(XMLMultiPageEditorPart.java:894) at org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart$ActivationListener.partOpened(XMLMultiPageEditorPart.java:164) at org.eclipse.ui.internal.PartListenerList$5.run(PartListenerList.java:132) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.runtime.Platform.run(Platform.java:888) at org.eclipse.ui.internal.PartListenerList.fireEvent(PartListenerList.java:57) at org.eclipse.ui.internal.PartListenerList.firePartOpened(PartListenerList.java:130) at org.eclipse.ui.internal.PartService.firePartOpened(PartService.java:276) at org.eclipse.ui.internal.WWinPartService$WWinListener.partOpened(WWinPartService.java:54) at org.eclipse.ui.internal.PartListenerList2$5.run(PartListenerList2.java:130) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.runtime.Platform.run(Platform.java:888) at org.eclipse.ui.internal.PartListenerList2.fireEvent(PartListenerList2.java:55) at org.eclipse.ui.internal.PartListenerList2.firePartOpened(PartListenerList2.java:128) at org.eclipse.ui.internal.PartService.firePartOpened(PartService.java:280) at org.eclipse.ui.internal.WorkbenchPagePartList.firePartOpened(WorkbenchPagePartList.java:35) at org.eclipse.ui.internal.PartList.partOpened(PartList.java:241) at org.eclipse.ui.internal.PartList.access$0(PartList.java:210) at org.eclipse.ui.internal.PartList$1.propertyChanged(PartList.java:40) at org.eclipse.ui.internal.WorkbenchPartReference.fireInternalPropertyChange(WorkbenchPartReference.java:375) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:610) at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2863) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768) at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610) at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.execute(OpenResourceHandler.java:129) at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.run(OpenResourceHandler.java:181) at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:289) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1253) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1103) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1099) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1508) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4268) at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4160) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2459) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) 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:369) 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:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407) at org.eclipse.equinox.launcher.Main.main(Main.java:1383) Reproducible: Always
Created attachment 180819 [details] The build file that I'm getting the NPE on
That's actually not the Ant editor. Opening your file with the Ant editor (check the file's context menu for an "Open With" submenu) should proceed fine.
I don't know what this stack trace tells you, but I most certainly am in the Ant Editor. The editor icon is the ant on paper icon, and the Outline view shows my targets and lets me execute them.
Hi David, I think Nitin's comment comes from XMLMultiPageEditorPart being in the stack trace. I know it's been awhile, but did this NPE occur when you opened the file itself or did you happen to not notice it until Eclipse started to act odd? Has this continued to be a problem as well? Since this bug was opened, a few null checks were added. So this may likely not occur anymore.
I don't remember the circumstances of the issue, and I haven't seen it since then.
Resolving since I've been unable to reproduce, and we should have cleaned up the area of code where the NPE would be thrown from. Thanks for your response, David.