gpt4 book ai didi

java - JVM 错误 : Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

转载 作者:太空狗 更新时间:2023-10-29 12:39:24 27 4
gpt4 key购买 nike

我在 intellij 上使用 openjdk11 + javafx11

每次我尝试运行需要 javafx 的代码时,我都会收到此错误。经过一番谷歌搜索后,它似乎与显示服务器(xorg,使用 archlinux kde 5)有关。但是我找不到任何可以帮助我解决问题的东西。

如果有人能提供一些解决方案的见解,那将是令人愉快的。

这是我运行时得到的输出:

/usr/lib/jvm/jdk-11.0.1/bin/java -Djava.library.path=/usr/lib/jvm/javafx-sdk-11.0.1/lib --module-path /usr/lib/jvm/javafx-sdk-11.0.1/lib --add-modules=javafx.controls,javafx.fxml -javaagent:/home/rurudu/Intellij/idea-IC-182.4892.20/lib/idea_rt.jar=45449:/home/rurudu/Intellij/idea-IC-182.4892.20/bin -Dfile.encoding=UTF-8 -classpath /home/rurudu/IdeaProjects/HelloFX/out/production/HelloFX:/usr/lib/jvm/javafx-sdk-11.0.1/lib/src.zip:/usr/lib/jvm/javafx-sdk-11.0.1/lib/javafx-swt.jar:/usr/lib/jvm/javafx-sdk-11.0.1/lib/javafx.web.jar:/usr/lib/jvm/javafx-sdk-11.0.1/lib/javafx.base.jar:/usr/lib/jvm/javafx-sdk-11.0.1/lib/javafx.fxml.jar:/usr/lib/jvm/javafx-sdk-11.0.1/lib/javafx.media.jar:/usr/lib/jvm/javafx-sdk-11.0.1/lib/javafx.swing.jar:/usr/lib/jvm/javafx-sdk-11.0.1/lib/javafx.controls.jar:/usr/lib/jvm/javafx-sdk-11.0.1/lib/javafx.graphics.jar sample.Main

(java:16177): Gdk-CRITICAL **: 14:11:28.282: gdk_x11_display_set_window_scale: assertion 'GDK_IS_X11_DISPLAY (display)' failed

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

最佳答案

我通过将此 arg 添加到运行命令来强制 jfx 使用 GTK2 运行来解决此问题:-Djdk.gtk.version=2

背景:我在尝试运行 Hello World example for OpenJFX 时遇到了完全相同的错误在运行 Xwayland 的 Fedora 上,经过一些搜索发现 an issue logged against openjdk-jfx描述了同样的问题。在评论中,它建议强制 jfx 使用 gtk2 运行:

We tested it locally and can reproduce a crash (at a different place than you reported), and it looks like it's related to running using GTK3. The default backend was GTK2 for FX in JDK 10 and is GTK3 in FX 11. As a workaround, you can force GTK 2 by running:

java -Djdk.gtk.version=2 ...

Also, you can pass -Djdk.gtk.verbose=true to see what is being used. I also note that we can make JDK 10 crash as well on Wayland by forcing GTK 3.

关于java - JVM 错误 : Process finished with exit code 134 (interrupted by signal 6: SIGABRT),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53549899/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com