Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319846 - [Compatibility] Opening and closing an ant editor causes NPEs
Summary: [Compatibility] Opening and closing an ant editor causes NPEs
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: 1.0 RC2   Edit
Assignee: Remy Suen CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
: 319297 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-07-14 08:54 EDT by Paul Webster CLA
Modified: 2010-07-15 09:40 EDT (History)
1 user (show)

See Also:


Attachments
PageBookView patch v1 (2.43 KB, patch)
2010-07-15 09:38 EDT, Remy Suen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2010-07-14 08:54:07 EDT
I had opened and closed an ant editor and clicked around in the outline.  When I went back to the other ant editor I had open, clicking in the outline got:

eclipse.buildId=I20100713-2016
java.fullversion=JRE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260sr8-20100401_55940 (JIT enabled, AOT enabled)
J9VM - 20100401_055940
JIT  - r9_20100401_15339
GC   - 20100308_AA
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86 -data /opt/pwebster/workspaces/e4


Error
Wed Jul 14 08:45:19 EDT 2010
Internal Error

org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:54)
at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:74)
at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:90)
at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:333)
at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:350)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:398)
at org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer.activate(AbstractPartRenderer.java:105)
at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer$1.handleEvent(ContributedPartRenderer.java:74)
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.Widget.sendEvent(Widget.java:1282)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1263)
at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1531)
at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:3401)
at org.eclipse.swt.widgets.Control.gtk_event_after(Control.java:2758)
at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1738)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4794)
at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:3485)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4372)
at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8163)
at org.eclipse.swt.widgets.Display.eventProc(Display.java:1239)
at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2224)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3169)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:693)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:618)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:106)
at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:535)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:519)
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:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:600)
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)
Caused by: java.lang.NullPointerException
at org.eclipse.ant.internal.ui.model.AntElementNode.getBuildFileResource(AntElementNode.java:562)
at org.eclipse.ant.internal.ui.model.AntElementNode.getIFile(AntElementNode.java:551)
at org.eclipse.ant.internal.ui.model.AntElementAdapterFactory.getAdapter(AntElementAdapterFactory.java:28)
at org.eclipse.core.internal.adapter.AdapterFactoryProxy.getAdapter(AdapterFactoryProxy.java:80)
at org.eclipse.core.internal.runtime.AdapterManager.getAdapter(AdapterManager.java:295)
at org.eclipse.ant.internal.ui.model.AntElementNode.getAdapter(AntElementNode.java:569)
at org.eclipse.ui.internal.ide.actions.ProjectPropertyDialogAction.getProject(ProjectPropertyDialogAction.java:117)
at org.eclipse.ui.internal.ide.actions.ProjectPropertyDialogAction.selectionChanged(ProjectPropertyDialogAction.java:84)
at org.eclipse.ui.internal.e4.compatibility.SelectionService.notifyListeners(SelectionService.java:135)
at org.eclipse.ui.internal.e4.compatibility.SelectionService.access$3(SelectionService.java:133)
at org.eclipse.ui.internal.e4.compatibility.SelectionService$1.selectionChanged(SelectionService.java:73)
at org.eclipse.e4.ui.internal.workbench.SelectionServiceImpl.notifyListeners(SelectionServiceImpl.java:196)
at org.eclipse.e4.ui.internal.workbench.SelectionServiceImpl.setPart(SelectionServiceImpl.java:153)
at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:600)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:47)
... 45 more
Comment 1 Remy Suen CLA 2010-07-14 09:03:39 EDT
Similar stack trace posted at bug 319297 though it's not clear if they're the same problem.
Comment 2 Remy Suen CLA 2010-07-14 21:49:50 EDT
*** Bug 319297 has been marked as a duplicate of this bug. ***
Comment 3 Remy Suen CLA 2010-07-15 07:51:39 EDT
1. Open your first Ant file.
2. Open the second Ant file.
3. Select something in the 'Outline' view.
4. Ctrl+W
5. Click something in the 'Outline' view.
6. The NPE occurs.
7. You also cannot close Eclipse now.
Comment 4 Remy Suen CLA 2010-07-15 09:38:13 EDT
Created attachment 174396 [details]
PageBookView patch v1

Patch to force selection changes when the page is changed.
Comment 5 Remy Suen CLA 2010-07-15 09:40:48 EDT
(In reply to comment #4)
> Created an attachment (id=174396) [details]
> PageBookView patch v1

Released to HEAD for the short term. Opened bug 319983 to evaluate whether this is appropriate or not.