简体   繁体   English

当用户在全屏模式下从 Mac 切换到另一个应用程序时,JavaFX 应用程序在 Mac 上崩溃

[英]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 Java SE 1.8
  • JavaFX for the user interface JavaFX 用于用户界面

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)控制台中出现错误(我很确定这不是 java 异常)

截屏

What is the problem?问题是什么? Does it happen only on Mac?它只发生在Mac上吗? How can I solve it?我该如何解决?

I solved this problem by updating to JavaFX 14. I suppose it was a bug of the library.我通过更新到 JavaFX 14 解决了这个问题。我想这是库的错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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