Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » BaseRenderer.unbindWidget (NullPointer exception, widget is null)
BaseRenderer.unbindWidget [message #1235456] Fri, 24 January 2014 07:19 Go to next message
Pablo Gomez is currently offline Pablo Gomez
Messages: 23
Registered: October 2013
Junior Member
Hi Tom,

I'm having a null pointer exception coming from the unbindWidget because sometimes the Widget argument of the method is null and there is no null check in the implementation of the unbind.

To get this null pointer you only need to restart the presentation engine a couple may be 3 times e.g.

@Inject
IPresentationEngine pe;

@Inject
MApplication app;

void init(){

	Button restartPresentationEngine = new Button("Presentation engine restart");

		restartPresentationEngine.setOnAction(new EventHandler<ActionEvent>() {
			@Override
			public void handle(ActionEvent e) {
				System.out.println("RESTARTING PRESENTATION ENGINE");
				pe.stop();
				pe.run(app, app.getContext());
			}
		});
[....]

}



I did a workaround by adding a nullcheck in the BaseRenderer.java

	private void unbindWidget(M me, W widget) {

		if (widget != null)
			widget.setDomElement(null);
		if (me != null)
			me.setWidget(null);
	}


But perhaps there is a deeper problem and unbindWidget should never receive null as an argument. I don't know...

Should I fire a bug in jira?

Below, the stacktrace of the exception


Best
Pablo



Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
	at org.eclipse.fx.ui.workbench.renderers.base.BaseRenderer.unbindWidget(BaseRenderer.java:263)
	at org.eclipse.fx.ui.workbench.renderers.base.BaseRenderer.destroyWidget(BaseRenderer.java:253)
	at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.removeGui(PartRenderingEngine.java:330)
	at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.removeGui(PartRenderingEngine.java:305)
	at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.removeGui(PartRenderingEngine.java:313)
	at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.removeGui(PartRenderingEngine.java:313)
	at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.stop(PartRenderingEngine.java:410)
	at UnbindWidgetNull.parts.MediaPart$1.handle(MediaPart.java:69)
	at UnbindWidgetNull.parts.MediaPart$1.handle(MediaPart.java:1)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
	at javafx.event.Event.fireEvent(Event.java:204)
	at javafx.scene.Node.fireEvent(Node.java:8175)
	at javafx.scene.control.Button.fire(Button.java:185)
	at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
	at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
	at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
	at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.event.Event.fireEvent(Event.java:204)
	at javafx.scene.Scene$MouseHandler.process(Scene.java:3684)
	at javafx.scene.Scene$MouseHandler.access$1800(Scene.java:3409)
	at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1671)
	at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2462)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:314)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:243)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:345)
	at com.sun.glass.ui.View.handleMouseEvent(View.java:526)
	at com.sun.glass.ui.View.notifyMouse(View.java:898)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
	at com.sun.glass.ui.win.WinApplication$4$1.run(WinApplication.java:112)
	at java.lang.Thread.run(Thread.java:744)



Re: BaseRenderer.unbindWidget [message #1235468 is a reply to message #1235456] Fri, 24 January 2014 07:54 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5262
Registered: July 2009
Senior Member
Please file a bug! Is there a reason to restart the the PRE?

Tom

On 24.01.14 13:19, Pablo Gomez wrote:
> Hi Tom,
>
> I'm having a null pointer exception coming from the unbindWidget
> because sometimes the Widget argument of the method is null and there is
> no null check in the implementation of the unbind.
>
> To get this null pointer you only need to restart the presentation
> engine a couple may be 3 times e.g.
>
>
> @Inject
> IPresentationEngine pe;
>
> @Inject
> MApplication app;
>
> void init(){
>
> Button restartPresentationEngine = new Button("Presentation engine
> restart");
>
> restartPresentationEngine.setOnAction(new
> EventHandler<ActionEvent>() {
> @Override
> public void handle(ActionEvent e) {
> System.out.println("RESTARTING PRESENTATION ENGINE");
> pe.stop();
> pe.run(app, app.getContext());
> }
> });
> [....]
>
> }
>
>
>
> I did a workaround by adding a nullcheck in the BaseRenderer.java
>
>
> private void unbindWidget(M me, W widget) {
>
> if (widget != null)
> widget.setDomElement(null);
> if (me != null)
> me.setWidget(null);
> }
>
>
> But perhaps there is a deeper problem and unbindWidget should never
> receive null as an argument. I don't know...
>
> Should I fire a bug in jira?
>
> Below, the stacktrace of the exception
>
>
> Best
> Pablo
>
>
>
>
> Exception in thread "JavaFX Application Thread"
> java.lang.NullPointerException
> at
> org.eclipse.fx.ui.workbench.renderers.base.BaseRenderer.unbindWidget(BaseRenderer.java:263)
>
> at
> org.eclipse.fx.ui.workbench.renderers.base.BaseRenderer.destroyWidget(BaseRenderer.java:253)
>
> at
> org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.removeGui(PartRenderingEngine.java:330)
>
> at
> org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.removeGui(PartRenderingEngine.java:305)
>
> at
> org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.removeGui(PartRenderingEngine.java:313)
>
> at
> org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.removeGui(PartRenderingEngine.java:313)
>
> at
> org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.stop(PartRenderingEngine.java:410)
>
> at UnbindWidgetNull.parts.MediaPart$1.handle(MediaPart.java:69)
> at UnbindWidgetNull.parts.MediaPart$1.handle(MediaPart.java:1)
> at
> com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
>
> at
> com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
>
> at
> com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
>
> at
> com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
>
> at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
>
> at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>
> at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>
> at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>
> at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>
> at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>
> at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>
> at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>
> at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>
> at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>
> at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>
> at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>
> at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
> at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
> at javafx.event.Event.fireEvent(Event.java:204)
> at javafx.scene.Node.fireEvent(Node.java:8175)
> at javafx.scene.control.Button.fire(Button.java:185)
> at
> com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
>
> at
> com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
>
> at
> com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
>
> at
> com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
>
> at
> com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
>
> at
> com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
>
> at
> com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
>
> at
> com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
>
> at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
>
> at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>
> at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>
> at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>
> at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>
> at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>
> at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>
> at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>
> at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>
> at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>
> at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>
> at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>
> at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
> at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
> at javafx.event.Event.fireEvent(Event.java:204)
> at javafx.scene.Scene$MouseHandler.process(Scene.java:3684)
> at javafx.scene.Scene$MouseHandler.access$1800(Scene.java:3409)
> at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1671)
> at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2462)
> at
> com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:314)
>
> at
> com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:243)
>
> at java.security.AccessController.doPrivileged(Native Method)
> at
> com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:345)
>
> at com.sun.glass.ui.View.handleMouseEvent(View.java:526)
> at com.sun.glass.ui.View.notifyMouse(View.java:898)
> at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
> at
> com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
> at com.sun.glass.ui.win.WinApplication$4$1.run(WinApplication.java:112)
> at java.lang.Thread.run(Thread.java:744)
>
>
>
>
Re: BaseRenderer.unbindWidget [message #1235471 is a reply to message #1235468] Fri, 24 January 2014 08:01 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5262
Registered: July 2009
Senior Member
Looking at the PRE I think the bug is that we are NOT removing the
renderer from the control when we remove it from the UI.

So the patch could be as simple as

> diff --git a/bundles/runtime/org.eclipse.fx.ui.workbench.fx/src/org/eclipse/fx/ui/workbench/fx/PartRenderingEngine.java b/bundles/runtime/org.eclipse.fx.ui.workbench.fx/src/org/eclipse/fx/ui/workbench/fx/PartRenderingEngine.java
> index ac991ba..bfdb44f 100755
> --- a/bundles/runtime/org.eclipse.fx.ui.workbench.fx/src/org/eclipse/fx/ui/workbench/fx/PartRenderingEngine.java
> +++ b/bundles/runtime/org.eclipse.fx.ui.workbench.fx/src/org/eclipse/fx/ui/workbench/fx/PartRenderingEngine.java
> @@ -347,6 +347,8 @@
> if (element instanceof MContext) {
> clearContext((MContext) element);
> }
> +
> + element.setRenderer(null);
> }
> }
> }

?

Anyways file a bug

Tom

On 24.01.14 13:54, Tom Schindl wrote:
> Please file a bug! Is there a reason to restart the the PRE?
>
> Tom
>
> On 24.01.14 13:19, Pablo Gomez wrote:
>> Hi Tom,
>>
>> I'm having a null pointer exception coming from the unbindWidget
>> because sometimes the Widget argument of the method is null and there is
>> no null check in the implementation of the unbind.
>>
>> To get this null pointer you only need to restart the presentation
>> engine a couple may be 3 times e.g.
>>
>>
>> @Inject
>> IPresentationEngine pe;
>>
>> @Inject
>> MApplication app;
>>
>> void init(){
>>
>> Button restartPresentationEngine = new Button("Presentation engine
>> restart");
>>
>> restartPresentationEngine.setOnAction(new
>> EventHandler<ActionEvent>() {
>> @Override
>> public void handle(ActionEvent e) {
>> System.out.println("RESTARTING PRESENTATION ENGINE");
>> pe.stop();
>> pe.run(app, app.getContext());
>> }
>> });
>> [....]
>>
>> }
>>
>>
>>
>> I did a workaround by adding a nullcheck in the BaseRenderer.java
>>
>>
>> private void unbindWidget(M me, W widget) {
>>
>> if (widget != null)
>> widget.setDomElement(null);
>> if (me != null)
>> me.setWidget(null);
>> }
>>
>>
>> But perhaps there is a deeper problem and unbindWidget should never
>> receive null as an argument. I don't know...
>>
>> Should I fire a bug in jira?
>>
>> Below, the stacktrace of the exception
>>
>>
>> Best
>> Pablo
>>
>>
>>
>>
>> Exception in thread "JavaFX Application Thread"
>> java.lang.NullPointerException
>> at
>> org.eclipse.fx.ui.workbench.renderers.base.BaseRenderer.unbindWidget(BaseRenderer.java:263)
>>
>> at
>> org.eclipse.fx.ui.workbench.renderers.base.BaseRenderer.destroyWidget(BaseRenderer.java:253)
>>
>> at
>> org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.removeGui(PartRenderingEngine.java:330)
>>
>> at
>> org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.removeGui(PartRenderingEngine.java:305)
>>
>> at
>> org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.removeGui(PartRenderingEngine.java:313)
>>
>> at
>> org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.removeGui(PartRenderingEngine.java:313)
>>
>> at
>> org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.stop(PartRenderingEngine.java:410)
>>
>> at UnbindWidgetNull.parts.MediaPart$1.handle(MediaPart.java:69)
>> at UnbindWidgetNull.parts.MediaPart$1.handle(MediaPart.java:1)
>> at
>> com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
>>
>> at
>> com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
>>
>> at
>> com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
>>
>> at
>> com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
>>
>> at
>> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
>>
>> at
>> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>>
>> at
>> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>>
>> at
>> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>>
>> at
>> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>>
>> at
>> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>>
>> at
>> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>>
>> at
>> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>>
>> at
>> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>>
>> at
>> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>>
>> at
>> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>>
>> at
>> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>>
>> at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
>> at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
>> at javafx.event.Event.fireEvent(Event.java:204)
>> at javafx.scene.Node.fireEvent(Node.java:8175)
>> at javafx.scene.control.Button.fire(Button.java:185)
>> at
>> com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
>>
>> at
>> com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
>>
>> at
>> com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
>>
>> at
>> com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
>>
>> at
>> com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
>>
>> at
>> com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
>>
>> at
>> com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
>>
>> at
>> com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
>>
>> at
>> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
>>
>> at
>> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>>
>> at
>> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>>
>> at
>> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>>
>> at
>> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>>
>> at
>> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>>
>> at
>> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>>
>> at
>> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>>
>> at
>> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>>
>> at
>> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>>
>> at
>> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
>>
>> at
>> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
>>
>> at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
>> at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
>> at javafx.event.Event.fireEvent(Event.java:204)
>> at javafx.scene.Scene$MouseHandler.process(Scene.java:3684)
>> at javafx.scene.Scene$MouseHandler.access$1800(Scene.java:3409)
>> at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1671)
>> at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2462)
>> at
>> com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:314)
>>
>> at
>> com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:243)
>>
>> at java.security.AccessController.doPrivileged(Native Method)
>> at
>> com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:345)
>>
>> at com.sun.glass.ui.View.handleMouseEvent(View.java:526)
>> at com.sun.glass.ui.View.notifyMouse(View.java:898)
>> at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
>> at
>> com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
>> at com.sun.glass.ui.win.WinApplication$4$1.run(WinApplication.java:112)
>> at java.lang.Thread.run(Thread.java:744)
>>
>>
>>
>>
>
Re: BaseRenderer.unbindWidget [message #1235483 is a reply to message #1235471] Fri, 24 January 2014 08:33 Go to previous messageGo to next message
Pablo Gomez is currently offline Pablo Gomez
Messages: 23
Registered: October 2013
Junior Member
thanks for the quick reply!

bug filed
here is the link: https://bugs.eclipse.org/bugs/show_bug.cgi?id=426578


Basically we restart the presentation engine to reload the UI with another language (previously changed the jvm locale to the desired one) so the user at runtime is able to change the UI language easily. But, perhaps there is a better way. Before we were restarting the PE we tried by provoking an invalidation with the toBeRendered parts flag. It was working too but the unbind was also throwing nullpointer sometimes.

[Updated on: Fri, 24 January 2014 08:34]

Report message to a moderator

Re: BaseRenderer.unbindWidget [message #1235488 is a reply to message #1235483] Fri, 24 January 2014 08:49 Go to previous messageGo to next message
Pablo Gomez is currently offline Pablo Gomez
Messages: 23
Registered: October 2013
Junior Member
your patch seems to be enough to fix the bug!
Re: BaseRenderer.unbindWidget [message #1235489 is a reply to message #1235483] Fri, 24 January 2014 08:46 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5262
Registered: July 2009
Senior Member
Hi,

You might be interested that Luna will come with direct support for this
- i think the correct solution is to null the renderer. We missed the M5
freeze so it will get into M6.

For e(fx)clipse this means you'll get support in 1.0.0 for it!

Can you give my patch a spin - if it fixes your problem - I'm willing to
include it into 0.9.0 which gets frozen today!

You can follow https://bugs.eclipse.org/bugs/show_bug.cgi?id=423991
where an SWT example is attached. It's really cool stuff!

Tom

On 24.01.14 14:33, Pablo Gomez wrote:
> thanks for the quick reply!
>
> bug filed
> here is the link: http://www.eclipse.org/forums/index.php/t/640483/
>
>
> Basically we restart the presentation engine to reload the UI with
> another language (previously changed the jvm locale to the desired one)
> so the user at runtime is able to change the UI language easily. But,
> perhaps there is a better way. Before we were restarting the PE we tried
> by provoking an invalidation with the toBeRendered parts flag. It was
> working too but the unbind was also throwing nullpointer sometimes.
Re: BaseRenderer.unbindWidget [message #1235493 is a reply to message #1235488] Fri, 24 January 2014 08:58 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5262
Registered: July 2009
Senior Member
prefect - I released the fix to 0.9.0 and started a build - should be
ready in about 15 minutes.

Tom

On 24.01.14 14:49, Pablo Gomez wrote:
> your patch seems to be enough to fix the bug!
Re: BaseRenderer.unbindWidget [message #1235497 is a reply to message #1235493] Fri, 24 January 2014 09:05 Go to previous message
Pablo Gomez is currently offline Pablo Gomez
Messages: 23
Registered: October 2013
Junior Member
thanks!! and for the link too, that is very useful for us
looking forward to 1.0.0 and Luna!! Smile
Previous Topic:IEventBroker.subscribe to UIEvents.UILifeCycle.APP_STARTUP_COMPLETE does not work
Next Topic:Detecting IApplication start
Goto Forum:
  


Current Time: Fri Aug 01 22:46:58 EDT 2014

Powered by FUDForum. Page generated in 0.02856 seconds