You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
The AnimSample throws a NullPointerException when pressing the f key. The anim variable is not initialized
Message: Cannot invoke "com.almasb.fxgl.animation.Animation.onUpdate(double)" because "this.anim" is null
Type: NullPointerException
Method: AnimSample.lambda$initInput$1()
Line: AnimSample.java:49
java.lang.NullPointerException: Cannot invoke "com.almasb.fxgl.animation.Animation.onUpdate(double)" because "this.anim" is null
at samples.main@17 dev-SNAPSHOT/sandbox.anim.AnimSample.lambda$initInput$1(AnimSample.java:49)
at com.almasb.fxgl.all@17 dev-SNAPSHOT/com.almasb.fxgl.dsl.FXGL$Companion$onKeyDown$1.onActionBegin(FXGL.kt:488)
at com.almasb.fxgl.core@17 dev-SNAPSHOT/com.almasb.fxgl.input.UserAction.begin$fxgl_core(UserAction.kt:37)
at com.almasb.fxgl.core@17 dev-SNAPSHOT/com.almasb.fxgl.input.Input.handlePressed(Input.kt:375)
at com.almasb.fxgl.core@17 dev-SNAPSHOT/com.almasb.fxgl.input.Input.onKeyEvent(Input.kt:318)
at com.almasb.fxgl.all@17 dev-SNAPSHOT/com.almasb.fxgl.app.PrimaryStageWindow$1$1.invoke(MainWindow.kt:308)
at com.almasb.fxgl.all@17 dev-SNAPSHOT/com.almasb.fxgl.app.PrimaryStageWindow$1$1.invoke(MainWindow.kt:308)
at com.almasb.fxgl.core@17 dev-SNAPSHOT/com.almasb.fxgl.core.fsm.StateMachine.runOnActiveStates(StateMachine.kt:69)
at com.almasb.fxgl.all@17 dev-SNAPSHOT/com.almasb.fxgl.app.PrimaryStageWindow$1.invoke(MainWindow.kt:308)
at com.almasb.fxgl.all@17 dev-SNAPSHOT/com.almasb.fxgl.app.PrimaryStageWindow$1.invoke(MainWindow.kt:306)
at com.almasb.fxgl.all@17 dev-SNAPSHOT/com.almasb.fxgl.app.MainWindow.addKeyHandler$lambda$1(MainWindow.kt:221)
at [email protected]/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at [email protected]/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at [email protected]/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at [email protected]/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at [email protected]/javafx.event.Event.fireEvent(Event.java:198)
at [email protected]/javafx.scene.Scene$KeyHandler.process(Scene.java:4113)
at [email protected]/javafx.scene.Scene.processKeyEvent(Scene.java:2159)
at [email protected]/javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2627)
at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:218)
at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:150)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleKeyEvent$1(GlassViewEventHandler.java:250)
at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:249)
at [email protected]/com.sun.glass.ui.View.handleKeyEvent(View.java:542)
at [email protected]/com.sun.glass.ui.View.notifyKey(View.java:966)
at [email protected]/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at [email protected]/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
at java.base/java.lang.Thread.run(Thread.java:833)
Hi,
The AnimSample throws a NullPointerException when pressing the
f
key. Theanim
variable is not initializedFXGL/fxgl-samples/src/main/java/sandbox/anim/AnimSample.java
Line 48 in 8930b39
The text was updated successfully, but these errors were encountered: