【问题标题】:Why does my Eclipse Luna 4.4 crash on Debian Wheezy 7.4 with Oracle JDK8 64bit?为什么我的 Eclipse Luna 4.4 在使用 Oracle JDK8 64 位的 Debian Wheezy 7.4 上崩溃?
【发布时间】:2014-09-12 10:11:22
【问题描述】:

我在 Oracle VirtualBox 上安装了 Debian GNU/Linux 7.4 (wheezy) 操作系统并且:

java version "1.8.0_11"
Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)

我下载了 Eclipse Luna 4.4。当我尝试运行 Eclipse 时发生错误:

A fatal error has been detected by the Java Runtime Environment:
SIGSEGV (0xb) at pc=0x00007f9e8a42173f, pid=10942, tid=140319582553856
JRE version: Java(TM) SE Runtime Environment (8.0_11-b12) (build 1.8.0_11-b12)
Java VM: Java HotSpot(TM) 64-Bit Server VM (25.11-b03 mixed mode linux-amd64 compressed oops)
Problematic frame:
C  [libgdk-x11-2.0.so.0+0x5173f]  gdk_display_open+0x3f
Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java

于是我在终端发出了一个命令:

$ ulimit -c unlimited
$ ./eclipse

但是发生了下一个错误:

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support
was removed in 8.0
(java:11276): GLib-GObject-WARNING **: cannot register existing type `GdkDisplayManager'
(java:11276): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed
(java:11276): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed
(java:11276): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(java:11276): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
(java:11276): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(java:11276): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
(java:11276): GLib-GObject-WARNING **: cannot register existing type `GdkDisplay'
(java:11276): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed
(java:11276): GLib-GObject-CRITICAL **: g_type_register_static: assertion `parent_type > 0' failed
(java:11276): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed
(java:11276): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed
A fatal error has been detected by the Java Runtime Environment:
SIGSEGV (0xb) at pc=0x00007f216d28473f, pid=11276, tid=139782222493440JRE version: Java(TM) SE Runtime Environment

(8.0_11-b12) (构建 1.8.0_11-b12) Java VM:Java HotSpot(TM) 64 位服务器 VM(25.11-b03 混合模式 linux-amd64 压缩 oops) 有问题的框架: C [libgdk-x11-2.0.so.0+0x5173f] gdk_display_open+0x3f 核心转储写入。默认位置:/home/abcdef/ECLIPSE_JAVA/eclipse/core 或 core.11276

我也尝试通过添加来解决这个问题:

-Dorg.eclipse.swt.browser.DefaultType=mozilla

到 eclipse.ini,但没有帮助。

谁能帮我解决这个问题?

【问题讨论】:

  • 试试:SWT_GTK3=0 ./eclipse

标签: java linux eclipse java-8


【解决方案1】:

根据: https://bugs.eclipse.org/bugs/show_bug.cgi?id=430736

添加 2 行 eclipse.ini:

--launcher.GTK_version
2

选项--launcher.GTK_version 应该在之前 --launcher.appendVmargs

TIBCO Jaspersoft® Studio - JasperReports 的可视化设计器出现问题(对话框无法正常工作):

像这样编辑 Jaspersoft Studio.ini:

-startup
plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.GTK_version
2
--launcher.library

或者在启动 Jasper Studio 之前添加这个 (runubuntu.sh):

export SWT_GTK3=0

【讨论】:

  • 我遇到了同样的问题,这个解决方案对我有用。谢谢!
  • --> Eclipse Mars 同样的解决方案。
  • Worked or me on Kepler Service Release 2。我的崩溃是在调试运行期间发生的。
  • 谢谢。为我工作(debian 7.8、eclipse luna、java8、openbox)
【解决方案2】:

在 Debian Wheezy 7.8(64 位)和使用 Eclipse - Luna 4.4.2harshrcBug 430736 上的评论与我的情况最相关,并解决了闪屏后的崩溃问题。使用 export SWT_GTK3=0

启动 eclipse
# from CLI / prompt in eclipse folder:
export SWT_GTK3=0 ; ./eclipse

【讨论】:

  • 这也适用于 Debian Jessie 和 Eclipse Neon。
  • 你完全重新接受了harrrc的答案。只做评论会更公平。
【解决方案3】:

"--launcher.GTK_version 2"

这对我也有用。 Debian 7 + STS 4.4.1 ,我必须在 eclipse.ini 中添加一行作为 ccer 添加。

【讨论】:

    【解决方案4】:

    在 Debian Wheezy 7.6 64 位上启动 STS 时,我在使用基于 Eclipse 的 Sping Tool Suite (STS) 和 JDK 8 时遇到了同样的问题。正如其他答案所建议的那样,将这两行添加到初始化文件 sts.ini (eclipse.ini) 中就可以了。

    -startup
    plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140603-1326
    -product
    org.springsource.sts.ide
    --launcher.defaultAction
    openFile
    --launcher.GTK_version
    2
    -vmargs
    -Dosgi.requiredJavaVersion=1.6
    -Xms40m
    -Xmx768m
    

    【讨论】:

      【解决方案5】:

      在来自 Oracle 的installing JDK 7 之后,我修改了 eclipse.ini 并使其指向来自 Oracle 的 Java 7。然后我阅读了arash javan 的发布表格,并修改了eclipse.ini 以指向正确版本的GTK。在这两个 mods 之后,eclipse 在 Debian 7 中工作。如果你想使用 JDK 8,我相信这仍然可以工作。

      -startup
      plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
      --launcher.library
      plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140603-1326
      -product
      org.eclipse.epp.package.jee.product
      --launcher.defaultAction
      openFile
      -showsplash
      org.eclipse.platform
      --launcher.XXMaxPermSize
      256m
      --launcher.defaultAction
      openFile
      --launcher.GTK_version
      2
      -vm
      /opt/jdk/jdk1.7.0_67/bin/java
      -vmargs
      -Dosgi.requiredJavaVersion=1.6
      -XX:MaxPermSize=256m
      -Xms40m
      -Xmx512m
      

      【讨论】:

        【解决方案6】:

        我在eclipse bugs page 找到了这个解决方案

        导出 SWT_GTK3=0

        【讨论】:

          【解决方案7】:

          尝试像这样编辑 eclipse.ini 文件:

          -startup
           plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
          --launcher.library
          plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140603-1326
          -product
          org.eclipse.epp.package.java.product
          --launcher.defaultAction
          openFile
          -showsplash
          org.eclipse.platform
          --launcher.XXMaxPermSize
          256m
          --launcher.defaultAction
          openFile
          --launcher.GTK_version
          2
          --launcher.appendVmargs
          -vmargs
          -Dosgi.requiredJavaVersion=1.6
          -XX:MaxPermSize=256m
          -Xms40m
          -Xmx512m
          

          【讨论】:

          • 看到这个后,我让它也指向 java 7 并且它工作了
          【解决方案8】:

          尝试使用 -noSplash 选项从命令行启动 Eclipse。 你的错误看起来像这样bug

          【讨论】:

            猜你喜欢
            • 2014-12-03
            • 2013-04-29
            • 1970-01-01
            • 2014-12-13
            • 1970-01-01
            • 1970-01-01
            • 2011-05-31
            • 2011-09-16
            相关资源
            最近更新 更多