Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Generates an exception when the program exits #1393

Open
shi00 opened this issue Dec 23, 2024 · 0 comments
Open

Generates an exception when the program exits #1393

shi00 opened this issue Dec 23, 2024 · 0 comments

Comments

@shi00
Copy link

shi00 commented Dec 23, 2024

I developed a program based on FXGL 21.1 and customized the IntroScene. When the program started and the IntroScene was displayed, I clicked the Exit button in the upper right corner of the window, and the following exception occurred:

11:12:49.703 [JavaFX Application Thread] FATAL FXGLApplication - Uncaught Exception:
kotlin.UninitializedPropertyAccessException: lateinit property bundle has not been initialized
at com.almasb.fxgl.all@21.1/com.almasb.fxgl.app.services.SystemBundleService.getBundle$fxgl(SystemBundleService.kt:27)
at com.almasb.fxgl.all@21.1/com.almasb.fxgl.app.services.SystemBundleService.saveSystemData(SystemBundleService.kt:66)
at com.almasb.fxgl.all@21.1/com.almasb.fxgl.app.services.SystemBundleService.onExit(SystemBundleService.kt:49)
at com.almasb.fxgl.all@21.1/com.almasb.fxgl.app.Engine.stopLoopAndExitServices(Engine.kt:166)
at com.almasb.fxgl.all@21.1/com.almasb.fxgl.app.FXGLApplication.exitFXGL(FXGLApplication.kt:299)
at com.almasb.fxgl.all@21.1/com.almasb.fxgl.dsl.FXGL$Companion$controller$1.exit(FXGL.kt:148)
at com.almasb.fxgl.all@21.1/com.almasb.fxgl.app.FXGLApplication$GameApplicationService$onInit$2.invoke(FXGLApplication.kt:425)
at com.almasb.fxgl.all@21.1/com.almasb.fxgl.app.FXGLApplication$GameApplicationService$onInit$2.invoke(FXGLApplication.kt:419)
at com.almasb.fxgl.all@21.1/com.almasb.fxgl.app.PrimaryStageWindow.initStage$lambda$2$lambda$0(MainWindow.kt:398)
at javafx.base@21.0.1/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
at javafx.base@21.0.1/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232)
at javafx.base@21.0.1/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189)
at javafx.base@21.0.1/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at javafx.base@21.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at javafx.base@21.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base@21.0.1/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base@21.0.1/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.base@21.0.1/javafx.event.Event.fireEvent(Event.java:198)
at javafx.graphics@21.0.1/com.sun.javafx.stage.WindowPeerListener.closing(WindowPeerListener.java:100)
at javafx.graphics@21.0.1/com.sun.javafx.tk.quantum.GlassWindowEventHandler.run(GlassWindowEventHandler.java:147)
at javafx.graphics@21.0.1/com.sun.javafx.tk.quantum.GlassWindowEventHandler.run(GlassWindowEventHandler.java:40)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at javafx.graphics@21.0.1/com.sun.javafx.tk.quantum.GlassWindowEventHandler.lambda$handleWindowEvent$4(GlassWindowEventHandler.java:178)
at javafx.graphics@21.0.1/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
at javafx.graphics@21.0.1/com.sun.javafx.tk.quantum.GlassWindowEventHandler.handleWindowEvent(GlassWindowEventHandler.java:176)
at javafx.graphics@21.0.1/com.sun.glass.ui.Window.handleWindowEvent(Window.java:1259)
at javafx.graphics@21.0.1/com.sun.glass.ui.Window.notifyClose(Window.java:1164)
at javafx.graphics@21.0.1/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics@21.0.1/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:185)
at java.base/java.lang.Thread.run(Thread.java:1575)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant