JVM错误:进程以退出代码134完成(被信号6:SIGABRT中断) [英] JVM error: Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

查看:992
本文介绍了JVM错误:进程以退出代码134完成(被信号6:SIGABRT中断)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在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示例.主要

(java:16177):Gdk-CRITICAL **:14:11:28.282:gdk_x11_display_set_window_scale:断言'GDK_IS_X11_DISPLAY(display)'失败

以退出代码134(被信号6:SIGABRT中断)结束的过程

解决方案

通过将arg添加到运行命令:-Djdk.gtk.version = 2

背景:尝试运行"Hello World"示例时,我遇到了完全相同的错误在运行Xwayland的Fedora上进行OpenJFX 并经过一些搜索后发现已记录问题描述相同问题的openjdk-jfx .在注释中,它建议强制jfx与gtk2一起运行:

我们在本地进行了测试,并且可以重现崩溃(在不同于您报告的位置),并且它似乎与使用GTK3运行有关.在JDK 10中,默认后端是FX的GTK2,在FX 11中是GTK3.作为解决方法,您可以通过运行以下命令来强制GTK 2:

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

此外,您可以传递-Djdk.gtk.verbose = true来查看正在使用的内容.我还注意到,通过强制GTK 3,我们也可以在Wayland上使JDK 10崩溃.

I am using openjdk11 + javafx11 on intellij

Every time I try running a code that requires javafx, I get this error. After some googling around, it seems like it has to do with the display server (xorg, using archlinux kde 5). But I can't find anything that helps me fix the problem.

If anyone could provide some insight to the solution, that would be delightful.

Here's the output I get when I run it:

/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)

解决方案

I was able to solve this by forcing jfx to run using GTK2 by adding this arg to the run command: -Djdk.gtk.version=2

Background: I ran into the exact same error while trying to run the Hello World example for OpenJFX on Fedora running Xwayland and after a bit of searching found an issue logged against openjdk-jfx that describes the same problem. In the comments it suggests forcing jfx to run with 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.

这篇关于JVM错误:进程以退出代码134完成(被信号6:SIGABRT中断)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆