Describe the bug
var state = FXGL.getWorldProperties();
FXGL.set("test","test");
state.remove("test");
state.clear();//throw exceptions
java.lang.IllegalArgumentException: Property test does not exist
at com.almasb.fxgl.core@17+dev-SNAPSHOT/com.almasb.fxgl.core.collection.PropertyMap.get(PropertyMap.kt:269)
at com.almasb.fxgl.core@17+dev-SNAPSHOT/com.almasb.fxgl.core.collection.PropertyMap.clear(PropertyMap.kt:209)
at com.whitewoodcity.xtrike@1.0.0/com.whitewoodcity.xtrike.gameplay.stage0.Prelude.<init>(Prelude.java:43)
at com.whitewoodcity.xtrike@1.0.0/com.whitewoodcity.xtrike.GameApp.push(GameApp.java:138)
at com.whitewoodcity.xtrike@1.0.0/com.whitewoodcity.xtrike.index.Index.lambda$initInput$19(Index.java:221)
at com.whitewoodcity.xtrike@1.0.0/com.whitewoodcity.xtrike.GameApp$2.onActionBegin(GameApp.java:111)
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.EmbeddedPaneWindow$1$1$1.invoke(MainWindow.kt:562)
at com.almasb.fxgl.all@17+dev-SNAPSHOT/com.almasb.fxgl.app.EmbeddedPaneWindow$1$1$1.invoke(MainWindow.kt:562)
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.EmbeddedPaneWindow$1$1.invoke(MainWindow.kt:562)
at com.almasb.fxgl.all@17+dev-SNAPSHOT/com.almasb.fxgl.app.EmbeddedPaneWindow$1$1.invoke(MainWindow.kt:560)
at com.almasb.fxgl.all@17+dev-SNAPSHOT/com.almasb.fxgl.app.MainWindow.addKeyHandler$lambda$1(MainWindow.kt:221)
at javafx.base@19.0.2.1/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
at javafx.base@19.0.2.1/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
at javafx.base@19.0.2.1/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
at javafx.base@19.0.2.1/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at javafx.base@19.0.2.1/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at javafx.base@19.0.2.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at javafx.base@19.0.2.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base@19.0.2.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base@19.0.2.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base@19.0.2.1/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base@19.0.2.1/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.base@19.0.2.1/javafx.event.Event.fireEvent(Event.java:198)
at javafx.graphics@19.0.2.1/javafx.scene.Scene$KeyHandler.process(Scene.java:4113)
at javafx.graphics@19.0.2.1/javafx.scene.Scene.processKeyEvent(Scene.java:2159)
at javafx.graphics@19.0.2.1/javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2627)
at javafx.graphics@19.0.2.1/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:218)
at javafx.graphics@19.0.2.1/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:150)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at javafx.graphics@19.0.2.1/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleKeyEvent$1(GlassViewEventHandler.java:250)
at javafx.graphics@19.0.2.1/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
at javafx.graphics@19.0.2.1/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:249)
at javafx.graphics@19.0.2.1/com.sun.glass.ui.View.handleKeyEvent(View.java:542)
at javafx.graphics@19.0.2.1/com.sun.glass.ui.View.notifyKey(View.java:966)
source code:
private fun get(propertyName: String) = properties.get(propertyName)
?: throw IllegalArgumentException("Property $propertyName does not exist")
To Reproduce
var state = FXGL.getWorldProperties();
FXGL.set("test","test");
state.remove("test");
state.clear();//throw exceptions
Expected behavior
wont throw exceptions
Runtime info(please complete the following information):
macosx aarch64 13.2.1
fxgl 17-snapshot
javafx 19.0.2.1
Attach log associated with the bug (can be found in "logs/")
Additional context / possible fixes
Add any other context about the problem here.
Describe the bug
source code:
To Reproduce
Expected behavior
wont throw exceptions
Runtime info(please complete the following information):
macosx aarch64 13.2.1
fxgl 17-snapshot
javafx 19.0.2.1
Attach log associated with the bug (can be found in "logs/")
Additional context / possible fixes
Add any other context about the problem here.