Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » java.lang.NullPointerException LazyStackRenderer.showElementRecursive when changing perspectives(Our application gets a java.lang.NullPointerException from the LazyStackRenderer.showElementRecursive class when changing perspectives.)
java.lang.NullPointerException LazyStackRenderer.showElementRecursive when changing perspectives [message #1783468] Tue, 13 March 2018 13:22 Go to next message
Scott Hasson is currently offline Scott HassonFriend
Messages: 3
Registered: March 2018
Junior Member
I'll apologize in advance if this is not the appropriate location for this question (if so, please let me know where I should post this issue).

We have the ability to choose perspectives in our application similar to in eclipse (when in eclipse you can add the git, java, debug, etc. perspective).

We're trying to move from Eclipse Kepler to Eclipse Oxygen and we see the exception below when doing the following:

- open our application, a default perspective is selected [perspective #1], select non default perspective [perspective #2]

- close the application

- re-open the application (default perspective is now selected [perspective #1])

- select the non-default perspective [perspective #2] -> exception thrown as outlined below and the application remains on perspective #1

*note: The exception will not be thrown if perspective #1 is selected prior to closing the application.

We can run the application with the -clearPersistedState argument and then the workbench.xmi is deleted on start-up and we won't see the exception.

Has anyone else run into this problem or know how to solve it (exception from the console below)? Could we be creating/using perspectives in an inappropriate way?

!ENTRY org.eclipse.ui 4 0 2017-11-06 11:08:29.138 !MESSAGE Unhandled event loop exception !STACK 0java.lang.NullPointerException at

org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:228) at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:271) at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:276) at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:276) at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:276) at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showTab(LazyStackRenderer.java:154) at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveStackRenderer.showTab(PerspectiveStackRenderer.java:85) at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.lambda$0(LazyStackRenderer.java:68) at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) at org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl.setSelectedElement(PerspectiveStackImpl.java:135) at org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl.setSelectedElement(PerspectiveStackImpl.java:1) at org.eclipse.e4.ui.workbench.addons.perspectiveswitcher.PerspectiveSwitcher$4.widgetSelected(PerspectiveSwitcher.java:543) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4238) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3817) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) at com.ipunwired.core.ui.application.Application.start(Application.java:23) 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:388) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) at org.eclipse.equinox.launcher.Main.run(Main.java:1499) at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
Re: java.lang.NullPointerException LazyStackRenderer.showElementRecursive when changing perspectives [message #1783479 is a reply to message #1783468] Tue, 13 March 2018 14:17 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
If you observe an exception in Eclipse code it's certainly worth a bug report (at http://bugs.eclipse.org).

In the stacktrace you show, I don't see anything from JDT, a more likely component to report against would be Eclipse > Platform > UI.
Re: java.lang.NullPointerException LazyStackRenderer.showElementRecursive when changing perspectives [message #1783526 is a reply to message #1783468] Tue, 13 March 2018 19:22 Go to previous messageGo to next message
Scott Hasson is currently offline Scott HassonFriend
Messages: 3
Registered: March 2018
Junior Member
There appears to be a bug fix posted for this just recently:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=531026

Any recommendations on how I would get an Oxygen Eclipse download with that fix present?

Or could I modify my already present Eclipse with the bug fix somehow?
Re: java.lang.NullPointerException LazyStackRenderer.showElementRecursive when changing perspectives [message #1783534 is a reply to message #1783526] Tue, 13 March 2018 19:59 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
The fix is not in Oxygen, it's in Milestone 6 towards Photon.
If you want to upgrade to this milestone: the Eclipse SDK is already available [1]
for the Eclipse Packages M6 will appear shortly (end of this week) [2]

[1] http://download.eclipse.org/eclipse/downloads/drops4/S-4.8M6-201803080630/
[2] https://www.eclipse.org/downloads/index-developer.php
Re: java.lang.NullPointerException LazyStackRenderer.showElementRecursive when changing perspectives [message #1783702 is a reply to message #1783534] Thu, 15 March 2018 19:06 Go to previous messageGo to next message
Scott Hasson is currently offline Scott HassonFriend
Messages: 3
Registered: March 2018
Junior Member
Just a follow up to ask if there anyway I could make the change for this bug fix within my Oxygen eclipse myself just to try it out (to ensure it does fix the issue)?

For example could I modify the source in the source plug-in jar file and then build that source (I'm not sure how exactly building that would be done), and then replace the existing plug-in with the bug with my newly built plug-in?

I'm just hesitant to move to Photon as I'm worried I may see new problems or other things I need to change/fix when doing so.

Thanks in advance.
Re: java.lang.NullPointerException LazyStackRenderer.showElementRecursive when changing perspectives [message #1783719 is a reply to message #1783702] Fri, 16 March 2018 09:30 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

IMHO the difficulties of moving to Photon M6 are likely to be less than the difficulties of backporting. It is probably easiest to do a quick experiment to see if Photon M6 is a disaster. (If it is, you may want to report some bugs to avoid them making it into Photon itself.)

Regards

Ed Willink
Previous Topic:How to recognize implicit toString call?
Next Topic:[resolved]JNI C library not found
Goto Forum:
  


Current Time: Thu Apr 25 12:06:13 GMT 2024

Powered by FUDForum. Page generated in 0.03127 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top