简体   繁体   中英

JavaFX application crashes on Mac when the user switch from it to another app in full screen mode

I don't understand what it can be. For this reason I don't know where to get my hands.

I'm using:

  • Java SE 1.8
  • JavaFX for the user interface

The condition in which the application crashes:

  • The app is showing a modal:
Stage dialog = new Stage();
dialog.setScene(new Scene(root));
dialog.initOwner(loader.getController());
dialog.initModality(Modality.WINDOW_MODAL); 
dialog.showAndWait();
  • The user switches from this app to another app opened in full screen.

This is what happens when the error occurs:

  1. The application is closed
  2. An error appears in the console (I'm pretty sure it's not a java exception)

截屏

What is the problem? Does it happen only on Mac? How can I solve it?

I solved this problem by updating to JavaFX 14. I suppose it was a bug of the library.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM