Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » WWidgetImpl.destroy() called more than once(Widget is destroyed several times causing NullpointerException)
WWidgetImpl.destroy() called more than once [message #1705260] Thu, 13 August 2015 11:02 Go to next message
Krzysztof Szymanek is currently offline Krzysztof SzymanekFriend
Messages: 9
Registered: June 2015
Junior Member
Basically I move MPart to another window and back. Below are steps
MElementContainer< MUIElement > parent = aPart.getParent();
parent.getChildren().remove( aPart );
MTrimmedWindow outWindow = emodelService.createModelElement( MTrimmedWindow.class );
outWindow.getChildren().add( aPart );
MWindow windowMain = ....
windowMain.getWindows().add( outWindow );
getPartService().activate( aPart, true );

//and back
aPart.getParent().getChildren().remove( aPart );
windowMain.getChildren().remove( aWindow );
MPartStack stack = getSelectedType( area, MPartStack.class );
stack.getChildren().add( aPart );
ePartService.activate( aPart, true );


and I got NPE:

org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:68)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:898)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:879)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:879)
	at org.eclipse.e4.core.internal.di.InjectorImpl.disposed(InjectorImpl.java:398)
	at org.eclipse.e4.core.internal.di.Requestor.disposed(Requestor.java:148)
	at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:78)
	at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:111)
	at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.handleInvalid(TrackableComputationExt.java:74)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.dispose(EclipseContext.java:174)
	at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.clearContext(PartRenderingEngine.java:424)
	at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.removeGui(PartRenderingEngine.java:401)
	at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine$1.handleEvent(PartRenderingEngine.java:145)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40)
	at org.eclipse.fx.ui.workbench.fx.internal.UISynchronizeImpl.syncExec(UISynchronizeImpl.java:88)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
	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:85)
	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:59)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
	at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setToBeRendered(UIElementImpl.java:303)
	at org.eclipse.fx.ui.workbench.renderers.base.addons.CleanUpAddon.lambda$0(CleanUpAddon.java:75)
	at org.eclipse.fx.ui.workbench.renderers.base.addons.CleanUpAddon$$Lambda$593/363516656.run(Unknown Source)
	at org.eclipse.fx.ui.workbench.fx.internal.UISynchronizeImpl.lambda$0(UISynchronizeImpl.java:119)
	at org.eclipse.fx.ui.workbench.fx.internal.UISynchronizeImpl$$Lambda$594/2091886541.handle(Unknown Source)
	at com.sun.scenario.animation.shared.TimelineClipCore.visitKeyFrame(Unknown Source)
	at com.sun.scenario.animation.shared.TimelineClipCore.playTo(Unknown Source)
	at javafx.animation.Timeline.impl_playTo(Unknown Source)
	at javafx.animation.AnimationAccessorImpl.playTo(Unknown Source)
	at com.sun.scenario.animation.shared.SingleLoopClipEnvelope.timePulse(Unknown Source)
	at javafx.animation.Animation.impl_timePulse(Unknown Source)
	at javafx.animation.Animation$1.lambda$timePulse$26(Unknown Source)
	at javafx.animation.Animation$1$$Lambda$428/835408009.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at javafx.animation.Animation$1.timePulse(Unknown Source)
	at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(Unknown Source)
	at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(Unknown Source)
	at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source)
	at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source)
	at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$400(Unknown Source)
	at com.sun.javafx.tk.quantum.QuantumToolkit$$Lambda$48/2101355160.run(Unknown Source)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.lambda$null$145(Unknown Source)
	at com.sun.glass.ui.win.WinApplication$$Lambda$44/139616675.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
	at org.eclipse.fx.ui.workbench.renderers.fx.widget.WWidgetImpl.destroy(WWidgetImpl.java:123)
	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)


exception is on line WWidgetImpl.activationCallbacks.clear(); so it means that widget is disposed several times.

Do you have any idea what I am doing wrong or if there is BUG in efxclipse?
Re: WWidgetImpl.destroy() called more than once [message #1705263 is a reply to message #1705260] Thu, 13 August 2015 11:18 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
In this use case it should never get disposed! Please file a bug report.

Tom

On 13.08.15 13:02, Krzysztof Szymanek wrote:
> Basically I move MPart to another window and back. Below are steps
>
> MElementContainer< MUIElement > parent = aPart.getParent();
> parent.getChildren().remove( aPart );
> MTrimmedWindow outWindow = emodelService.createModelElement(
> MTrimmedWindow.class );
> outWindow.getChildren().add( aPart );
> MWindow windowMain = ....
> windowMain.getWindows().add( outWindow );
> getPartService().activate( aPart, true );
>
> //and back
> aPart.getParent().getChildren().remove( aPart );
> windowMain.getChildren().remove( aWindow );
> MPartStack stack = getSelectedType( area, MPartStack.class );
> stack.getChildren().add( aPart );
> ePartService.activate( aPart, true );
>
>
> and I got NPE:
>
> org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException
> at
> org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:68)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:898)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:879)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:879)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.disposed(InjectorImpl.java:398)
>
> at
> org.eclipse.e4.core.internal.di.Requestor.disposed(Requestor.java:148)
> at
> org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:78)
>
> at
> org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:111)
>
> at
> org.eclipse.e4.core.internal.contexts.TrackableComputationExt.handleInvalid(TrackableComputationExt.java:74)
>
> at
> org.eclipse.e4.core.internal.contexts.EclipseContext.dispose(EclipseContext.java:174)
>
> at
> org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.clearContext(PartRenderingEngine.java:424)
>
> at
> org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.removeGui(PartRenderingEngine.java:401)
>
> at
> org.eclipse.fx.ui.workbench.fx.PartRenderingEngine$1.handleEvent(PartRenderingEngine.java:145)
>
> at
> org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40)
>
> at
> org.eclipse.fx.ui.workbench.fx.internal.UISynchronizeImpl.syncExec(UISynchronizeImpl.java:88)
>
> at
> org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36)
>
> at
> org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
>
> 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:85)
>
> at
> org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:59)
>
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
>
> at
> org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setToBeRendered(UIElementImpl.java:303)
>
> at
> org.eclipse.fx.ui.workbench.renderers.base.addons.CleanUpAddon.lambda$0(CleanUpAddon.java:75)
>
> at
> org.eclipse.fx.ui.workbench.renderers.base.addons.CleanUpAddon$$Lambda$593/363516656.run(Unknown
> Source)
> at
> org.eclipse.fx.ui.workbench.fx.internal.UISynchronizeImpl.lambda$0(UISynchronizeImpl.java:119)
>
> at
> org.eclipse.fx.ui.workbench.fx.internal.UISynchronizeImpl$$Lambda$594/2091886541.handle(Unknown
> Source)
> at
> com.sun.scenario.animation.shared.TimelineClipCore.visitKeyFrame(Unknown
> Source)
> at com.sun.scenario.animation.shared.TimelineClipCore.playTo(Unknown
> Source)
> at javafx.animation.Timeline.impl_playTo(Unknown Source)
> at javafx.animation.AnimationAccessorImpl.playTo(Unknown Source)
> at
> com.sun.scenario.animation.shared.SingleLoopClipEnvelope.timePulse(Unknown
> Source)
> at javafx.animation.Animation.impl_timePulse(Unknown Source)
> at javafx.animation.Animation$1.lambda$timePulse$26(Unknown Source)
> at javafx.animation.Animation$1$$Lambda$428/835408009.run(Unknown
> Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at javafx.animation.Animation$1.timePulse(Unknown Source)
> at
> com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(Unknown
> Source)
> at
> com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(Unknown Source)
> at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source)
> at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source)
> at
> com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$400(Unknown
> Source)
> at
> com.sun.javafx.tk.quantum.QuantumToolkit$$Lambda$48/2101355160.run(Unknown
> Source)
> at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
> at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
> at com.sun.glass.ui.win.WinApplication.lambda$null$145(Unknown Source)
> at
> com.sun.glass.ui.win.WinApplication$$Lambda$44/139616675.run(Unknown
> Source)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.NullPointerException
> at
> org.eclipse.fx.ui.workbench.renderers.fx.widget.WWidgetImpl.destroy(WWidgetImpl.java:123)
>
> 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)
>
> exception is on line WWidgetImpl.activationCallbacks.clear(); so it
> means that widget is disposed several times.
>
> Do you have any idea what I am doing wrong or if there is BUG in efxclipse?
Re: WWidgetImpl.destroy() called more than once [message #1705266 is a reply to message #1705263] Thu, 13 August 2015 11:39 Go to previous message
Krzysztof Szymanek is currently offline Krzysztof SzymanekFriend
Messages: 9
Registered: June 2015
Junior Member
Thank you Tom,
I created below bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=474890
Previous Topic:Difference between Area and Part Sash Container
Next Topic:Cannot run Media Application sample under e(fx)clipse 2.0
Goto Forum:
  


Current Time: Thu Jan 23 21:58:45 GMT 2025

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

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

Back to the top