-
Bug
-
Resolution: Incomplete
-
P4
-
None
-
jfx21
-
x86_64
-
windows_10
A DESCRIPTION OF THE PROBLEM :
Inside a JavaFX application we may start a Scene using Groovy scripts and a library called GroovyFX.
Sometimes I receive the error bellow. It is very hard to create a test case for this.
I tested and the method showAndWait is called on the JavaFX thread.
Is any way to fix or help me with this?
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "com.sun.javafx.tk.TKStage.setOpacity(float)" because "this.this$0.peer" is null
at javafx.stage.Window$12.invalidated(Window.java:1184)
at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145)
at javafx.stage.Window.setShowing(Window.java:1239)
at javafx.stage.Window.show(Window.java:1254)
at javafx.stage.Stage.show(Stage.java:277)
at javafx.stage.Stage.showAndWait(Stage.java:467)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at groovyx.javafx.factory.StageFactory.onNodeCompleted(StageFactory.groovy:130)
at groovy.util.FactoryBuilderSupport.nodeCompleted(FactoryBuilderSupport.java:1006)
at groovy.util.FactoryBuilderSupport.dispatchNodeCall(FactoryBuilderSupport.java:904)
at groovy.util.FactoryBuilderSupport.doInvokeMethod(FactoryBuilderSupport.java:789)
at groovy.util.FactoryBuilderSupport.invokeMethod(FactoryBuilderSupport.java:504)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:651)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:628)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:405)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:328)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1007)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at Script1$_run_closure3.doCall(Script1.groovy:196)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:343)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:328)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:279)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1007)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:645)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:628)
at org.codehaus.groovy.runtime.InvokerHelper.invokeClosure(InvokerHelper.java:107)
at groovyx.javafx.GroovyFX.start(GroovyFX.java:73)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at Script1.run(Script1.groovy:195)
at com.wisecoders.dbs.data.task.FxApplicationTask.lambda$call$0(FxApplicationTask.java:42)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
at java.base/java.lang.Thread.run(Thread.java:1583)
FREQUENCY : often
Inside a JavaFX application we may start a Scene using Groovy scripts and a library called GroovyFX.
Sometimes I receive the error bellow. It is very hard to create a test case for this.
I tested and the method showAndWait is called on the JavaFX thread.
Is any way to fix or help me with this?
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "com.sun.javafx.tk.TKStage.setOpacity(float)" because "this.this$0.peer" is null
at javafx.stage.Window$12.invalidated(Window.java:1184)
at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145)
at javafx.stage.Window.setShowing(Window.java:1239)
at javafx.stage.Window.show(Window.java:1254)
at javafx.stage.Stage.show(Stage.java:277)
at javafx.stage.Stage.showAndWait(Stage.java:467)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at groovyx.javafx.factory.StageFactory.onNodeCompleted(StageFactory.groovy:130)
at groovy.util.FactoryBuilderSupport.nodeCompleted(FactoryBuilderSupport.java:1006)
at groovy.util.FactoryBuilderSupport.dispatchNodeCall(FactoryBuilderSupport.java:904)
at groovy.util.FactoryBuilderSupport.doInvokeMethod(FactoryBuilderSupport.java:789)
at groovy.util.FactoryBuilderSupport.invokeMethod(FactoryBuilderSupport.java:504)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:651)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:628)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:405)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:328)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1007)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at Script1$_run_closure3.doCall(Script1.groovy:196)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:343)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:328)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:279)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1007)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:645)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:628)
at org.codehaus.groovy.runtime.InvokerHelper.invokeClosure(InvokerHelper.java:107)
at groovyx.javafx.GroovyFX.start(GroovyFX.java:73)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at Script1.run(Script1.groovy:195)
at com.wisecoders.dbs.data.task.FxApplicationTask.lambda$call$0(FxApplicationTask.java:42)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
at java.base/java.lang.Thread.run(Thread.java:1583)
FREQUENCY : often