英文:
JavaFX application crashes on Mac when the user switch from it to another app in full screen mode
问题
我不明白它可能是什么。因此,我不知道从哪里着手。
我正在使用:
- Java SE 1.8
- 用于用户界面的 JavaFX
应用程序崩溃的情况:
- 应用程序正在显示一个模态:
Stage dialog = new Stage();
dialog.setScene(new Scene(root));
dialog.initOwner(loader.getController());
dialog.initModality(Modality.WINDOW_MODAL);
dialog.showAndWait();
- 用户从此应用程序切换到全屏打开的另一个应用程序。
当错误发生时会出现以下情况:
- 应用程序关闭
- 控制台中出现错误(我很确定这不是 Java 异常)
问题是什么?
这只在 Mac 上发生吗?
如何解决这个问题?
英文:
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:
- The application is closed
- 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?
答案1
得分: 0
我通过升级至JavaFX 14来解决了这个问题。
我猜这可能是库的一个bug。
英文:
I solved this problem by updating to JavaFX 14.
I suppose it was a bug of the library.
专注分享java语言的经验与见解,让所有开发者获益!
评论