To reproduce this, run the following on a macOS 13 Ventura system:
1. Run the HelloFullscreen program (in apps/toys/Hello)
2. Press the "Exit" button
The program will exit with a 0 status, but the following exception will be printed in the console:
Exception in thread "JavaFX Application Thread" java.lang.IllegalStateException: Not on FX application thread; currentThread = JavaFX Application Thread
at javafx.graphics@20-internal/com.sun.javafx.tk.Toolkit.checkFxUserThread(Toolkit.java:294)
at javafx.graphics@20-internal/com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(QuantumToolkit.java:475)
at javafx.graphics@20-internal/javafx.stage.Window.setShowing(Window.java:1238)
at javafx.graphics@20-internal/javafx.stage.Window.hide(Window.java:1264)
at javafx.graphics@20-internal/com.sun.javafx.stage.WindowPeerListener.closed(WindowPeerListener.java:112)
at javafx.graphics@20-internal/com.sun.javafx.tk.quantum.GlassWindowEventHandler.run(GlassWindowEventHandler.java:144)
at javafx.graphics@20-internal/com.sun.javafx.tk.quantum.GlassWindowEventHandler.run(GlassWindowEventHandler.java:40)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at javafx.graphics@20-internal/com.sun.javafx.tk.quantum.GlassWindowEventHandler.lambda$handleWindowEvent$4(GlassWindowEventHandler.java:178)
at javafx.graphics@20-internal/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
at javafx.graphics@20-internal/com.sun.javafx.tk.quantum.GlassWindowEventHandler.handleWindowEvent(GlassWindowEventHandler.java:176)
at javafx.graphics@20-internal/com.sun.glass.ui.Window.handleWindowEvent(Window.java:1247)
at javafx.graphics@20-internal/com.sun.glass.ui.Window.notifyDestroy(Window.java:1161)
This does not happen on other platforms or on earlier versions of macOS.