Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux技術

Eclipse 在 Linux Mint 崩潰「Failed to write core dump」的解法

在 Linux Mint 上啟動 Eclipse 時直接閃退,主控台吐出一段 JVM 致命錯誤訊息:

#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x6ce98991, pid=8881, tid=0xb6722b40
#
# JRE version: Java(TM) SE Runtime Environment (8.0_101-b13) (build 1.8.0_101-b13)
# Java VM: Java HotSpot(TM) Server VM (25.101-b13 mixed mode linux-x86 )
# Problematic frame:
# C [libwebkitgtk-1.0.so.0+0x1d2991]
#
# 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:
# https://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.

原因

關鍵在 problematic frame 那一行:libwebkitgtk-1.0.so.0。Eclipse 預設使用 webkitgtk 作為內嵌瀏覽器元件(等同參數 -Dorg.eclipse.swt.browser.DefaultType=webkit),而你系統上的 webkitgtk 版本與 Eclipse 所需的不相容,於是原生層 crashes。

解法

把內嵌瀏覽器改成 Mozilla 引擎。在 eclipse.ini 檔案最後補上:

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

存檔後重新啟動 Eclipse 即可。這個改動只影響 Eclipse 內部顯示網頁的方式,不影響系統其他應用。

Copyright © Linux教程網 All Rights Reserved