Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Exception in Application stop method in 1.7.19 #991

Closed
RazmikDev opened this issue May 14, 2019 · 2 comments
Closed

Exception in Application stop method in 1.7.19 #991

RazmikDev opened this issue May 14, 2019 · 2 comments

Comments

@RazmikDev
Copy link

RazmikDev commented May 14, 2019

Application with NoPrimaryViewSpecified as primaryView fails on shutdown (App.stop()) with following exception:

java.lang.RuntimeException: Exception in Application stop method
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:922)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$1(LauncherImpl.java:182)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: root.scene must not be null
	at tornadofx.UIComponent.unInit(Component.kt:575)
	at tornadofx.App.stop(App.kt:140)

that occurs here

root.scene.window.showingProperty().removeListener(rootSceneWindowShowingPropertyChangeListener)

Valid only for v1.7.19 - might be related with #973

@carltonwhitehead
Copy link
Contributor

@RazmikDev I agree with your suspicion that it's related to #973. I made some adjustments including that line and didn't think to test NoPrimaryViewSpecified scenario. Sorry about that! I'll add a test for that scenario and fix the bug.

@edvin
Copy link
Owner

edvin commented May 18, 2019

Thank you @carltonwhitehead :)

@edvin edvin closed this as completed in 69aa0a9 May 18, 2019
edvin pushed a commit that referenced this issue May 18, 2019
…ecified

Fix NoPrimaryViewSpecified lifecycle issue, closes #991
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants