Eclipse + CubeMX Java 运行时环境检测到致命错误

Eclipse + CubeMX Java 运行时环境检测到致命错误

晚上好!我是 Linux 新手,正在尝试学习用于 STM32 微控制器开发的 Eclipse 环境。我已经安装了 Eclipse,并尝试安装一个插件来与微控制器配合使用。插件安装成功,但当我单击窗口->显示视图->其他->Cube MX 时,它会崩溃并出现以下错误:

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f570faa92b7, pid=7360, tid=0x00007f57bfc5f700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_101-b13) (build 1.8.0_101-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.101-b13 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libgdk-x11-2.0.so.0+0x4e2b7]  gdk_display_open+0x57
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  T H R E A D  ---------------

Current thread (0x00007f57b800b000):  JavaThread "main" [_thread_in_native, id=7361, stack(0x00007f57bfb5f000,0x00007f57bfc60000)]

siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000114

我试图升级到 Oracle Java,尝试输入命令“ulimit -c unlimited”来重新安装插件和 Eclipse 本身,但无济于事。

答案1

我遇到了同样的问题,并通过以下措施解决了该问题:

  1. 更新 eclipse.ini 以使 Eclipse 使用 GTKv2:

    添加以下行:

    --launcher.GTK_Version 2

    确保将它们添加到 Eclipse 选项中,而不是文件中包含的 VM 参数中。

  2. 以 root 身份运行 Eclipse

相关内容