JDK-8299738 : ISE if Platform::exit called with fullScreen Stage on macOS 13
  • Type: Bug
  • Component: javafx
  • Sub-Component: window-toolkit
  • Affected Version: jfx11,8
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • Submitted: 2023-01-06
  • Updated: 2024-07-22
  • Resolved: 2024-07-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
jfx23Fixed
Related Reports
Relates :  
Relates :  
Description
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.
Comments
A pull request was submitted for review. Branch: jfx23 URL: https://git.openjdk.org/jfx/pull/1511 Date: 2024-07-17 12:21:59 +0000
17-07-2024

Changeset: 81f11c4a Branch: master Author: Kevin Rushforth <kcr@openjdk.org> Date: 2024-07-17 12:15:21 +0000 URL: https://git.openjdk.org/jfx/commit/81f11c4a39eb505d17c57a49c5e084f75a169856
17-07-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jfx/pull/1506 Date: 2024-07-15 19:36:43 +0000
15-07-2024

Workaround: Close the stage or exit full screen before calling Platform.exit().
06-01-2023