Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314896 - [Compatibility] NPEs kill workbench
Summary: [Compatibility] NPEs kill workbench
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 1.0 RC0   Edit
Assignee: Remy Suen CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-28 11:15 EDT by Paul Webster CLA
Modified: 2010-06-01 08:14 EDT (History)
1 user (show)

See Also:


Attachments
Full log (94.73 KB, text/plain)
2010-05-28 11:15 EDT, Paul Webster CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2010-05-28 11:15:33 EDT
Created attachment 170360 [details]
Full log

I'm working in last night's 4.0 SDK build: I20100527-2121

I applied a patch, and slightly later did an Override and Update.  Then clicking on my SDK pops up a dialog repeatedly.

!ENTRY org.eclipse.e4.ui.workbench 4 0 2010-05-28 11:13:05.197
!MESSAGE Internal Error
!STACK 0
java.lang.NullPointerException
	at org.eclipse.e4.workbench.ui.internal.ModelServiceImpl.match(ModelServiceImpl.java:55)
	at org.eclipse.e4.workbench.ui.internal.ModelServiceImpl.findElementsRecursive(ModelServiceImpl.java:75)
	at org.eclipse.e4.workbench.ui.internal.ModelServiceImpl.findElements(ModelServiceImpl.java:126)
	at org.eclipse.e4.workbench.ui.internal.ModelServiceImpl.find(ModelServiceImpl.java:140)
	at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.isInContainer(PartServiceImpl.java:317)
	at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.activate(PartServiceImpl.java:348)
	at org.eclipse.e4.ui.workbench.swt.internal.AbstractPartRenderer.activate(AbstractPartRenderer.java:105)
	at org.eclipse.e4.workbench.ui.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:1234)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1239)
	at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1531)
	at org.eclipse.swt.widgets.Control.gtk_button_press_event(Control.java:2637)
	at org.eclipse.swt.widgets.Control.gtk_button_press_event(Control.java:2573)
	at org.eclipse.swt.widgets.Composite.gtk_button_press_event(Composite.java:654)
	at org.eclipse.swt.widgets.Canvas.gtk_button_press_event(Canvas.java:152)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1707)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4783)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4358)
	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:3157)
	at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine$3.run(PartRenderingEngine.java:520)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.run(PartRenderingEngine.java:457)
	at org.eclipse.e4.workbench.ui.internal.E4Workbench.createAndRunUI(E4Workbench.java:102)
	at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:534)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:520)
	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:37)
	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)
Comment 1 Remy Suen CLA 2010-05-28 11:18:44 EDT
I've seen this before. You get into an infinite loop and you have to close/terminate Eclipse.
Comment 2 Eric Moffatt CLA 2010-05-28 13:18:53 EDT
This is the end result of what is apparently a rampant context (one whose 'rootContainer' is null). Does anyone know a way to reproduce this? It's one of the most egregious bugs we have now.

Note that there's now a 'setRootContainer' method in PartServiceImpl specifically so that we can add a breakpoint there that fires when 'root' is null. I'm currently doing all my work with a BP set there but haven't seen the issue (sort of like when you bring your car to the mechanic and it works OK..;-).
Comment 3 Remy Suen CLA 2010-06-01 07:37:43 EDT
How to reproduce in your inner:

1. Close all your editors.
2. Open a file. The editor is active.
3. Window > Open Perspective > Debug
4. Close the editor.
5. Window > Open Perspective > Java
6. Click on a view. NPE.
Comment 4 Remy Suen CLA 2010-06-01 08:14:08 EDT
Fix delivered to HEAD. The 'Java' perspective's context still thinks the editor is the active child which is a problem. This is similar to bug 315133 in that we still have some holes in our perspective story that needs to be fleshed out (such as activation list/order).
Comment 5 Remy Suen CLA 2010-06-01 08:14:18 EDT
Whoops.