Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 578502 - NPE in Project Explorer in Java 8 only
Summary: NPE in Project Explorer in Java 8 only
Status: CLOSED DUPLICATE of bug 434393
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-31 22:27 EST by Kate Labeeva CLA
Modified: 2022-02-01 06:43 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kate Labeeva CLA 2022-01-31 22:27:15 EST
We are using Eclipse Luna with our plugin that modifies Project Explorer. Eclipse is running fine on Java 7. After we switched  to Java 8 (rebuilt plugin in Java 8 and run Eclipse under Java 8),  we see the NPE on selection change in Project Explorer: 

java.lang.NullPointerException
	at org.eclipse.swt.widgets.Control.internal_new_GC(Control.java:2118)
	at org.eclipse.swt.graphics.GC.cocoa_new(GC.java:207)
	at org.eclipse.swt.widgets.Tree.sendMeasureItem(Tree.java:2593)
	at org.eclipse.swt.widgets.Tree.cellSize(Tree.java:288)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5517)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper_stret(Native Method)
	at org.eclipse.swt.widgets.Widget.expansionFrameWithFrame_inView(Widget.java:798)
	at org.eclipse.swt.widgets.Tree.expansionFrameWithFrame_inView(Tree.java:1271)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5896)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend_bool(Native Method)
	at org.eclipse.swt.internal.cocoa.NSRunLoop.runMode(NSRunLoop.java:42)
	at org.eclipse.swt.widgets.Display.sleep(Display.java:4680)
	at org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(WorkbenchAdvisor.java:368)
	at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.eventLoopIdle(IDEWorkbenchAdvisor.java:918)
	at org.eclipse.ui.internal.Workbench$3.eventLoopIdle(Workbench.java:498)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1155)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236)
	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:648)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Comment 1 Rolf Theunissen CLA 2022-02-01 06:43:23 EST
Luna is a very old release (2014), the Eclipse Platform only supports the latest/next release (2022-03). This Bug has was already fixed for the Mars release (2015).

Either backport the fix yourself, or upgrade to a newer Eclipse version.

*** This bug has been marked as a duplicate of bug 434393 ***