Bug 549987 - NullPointerException on startup (seemingly after installing git plugins)
Summary: NullPointerException on startup (seemingly after installing git plugins)
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.11   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-12 15:39 EDT by Klemen Ferjancic CLA
Modified: 2019-09-30 06:39 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klemen Ferjancic CLA 2019-08-12 15:39:10 EDT
Fedora 30 stock install from Gnome Software (2019-03)
After installing 3 of the git plugins I got this error on startup. Changing workspace does not help, I am stuck.

!ENTRY org.eclipse.osgi 4 0 2019-08-12 21:28:55.591
!MESSAGE Application error
!STACK 1
java.lang.NullPointerException
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1106)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:566)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:661)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1476)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1449)
Comment 1 Klemen Ferjancic CLA 2019-08-12 15:44:07 EDT
After removing all 3 plugins still the same error, perhaps they were not the cause.

eclipse -application org.eclipse.equinox.p2.director -uninstallIU org.eclipse.egit.feature.group/5.3.0.201903130848-r
eclipse -application org.eclipse.equinox.p2.director -uninstallIU org.eclipse.egit.gitflow.feature.feature.group/5.3.0.201903130848-r
eclipse -application org.eclipse.equinox.p2.director -uninstallIU org.eclipse.egit.mylyn.feature.group/5.3.0.201903130848-r
Comment 2 Reinhold Degenfellner CLA 2019-09-30 04:34:30 EDT
I do have the same problem on windows.
It is an occasional error though. Normally it goes away with some workspace refeshing and cleaning. Currently not though.

ENTRY org.eclipse.osgi 4 0 2019-09-30 10:24:39.046
!MESSAGE Application error
!STACK 1
java.lang.NullPointerException
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1106)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:635)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1441)
Comment 3 Karsten Thoms CLA 2019-09-30 05:18:24 EDT
The related line is
   IApplicationContext ac = appContext.get(IApplicationContext.class);
So appContext is null.

Seems that the @PostConstruct method initiatilize was called with a null context, or set to null.
From reading the code both situations don't seem likely. The appContext in 
   org.eclipse.e4.ui.internal.workbench.E4Workbench.instantiateRenderer()
can't be null, since it was already used before. With that context the PartRenderingEngine is instantiated. From setting a breakpoint in PartRenderingEngine's initialize() method I see that this is called during the instantiation process. It gets the same IEclipseContext instance as in E4Workbench.instantiateRenderer().

Within PartRenderingEngine I don't see code that sets appContext to null.

So either the line 1106 wasn't correct detected (I compared to 2019-03, #ac93f51), or I don't get how this can happen.

Any way to reproduce the issue? Other ideas?
Comment 4 Klemen Ferjancic CLA 2019-09-30 05:36:51 EDT
I will try to get the exact build version to make sure code lines are relavant.
Comment 5 Reinhold Degenfellner CLA 2019-09-30 06:39:42 EDT
For me it was with 2019-06