在尝试运行Junit测试用例时,eclipse崩溃了。 Junit使用与工作区相同的JRE。 Worspace正在使用Oracles JVM jdk1.8.0_151.jdk,如下面的Eclipse.ini中所示 日志显示如下:
#A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fff7dc97010, pid=2898, tid=0x0000000000000307
#
# JRE version: Java(TM) SE Runtime Environment (8.0_151-b12) (build 1.8.0_151-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.151-b12 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C [libsystem_platform.dylib+0x5010] _platform_memmove$VARIANT$Haswell+0xf0
#
# 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.
不确定这是否相关: https://bugs.openjdk.java.net/browse/JDK-8184898
如果确实如此,我在Eclipse.ini中添加此参数的位置在哪里?添加它也没有帮助。
我的Eclipse.ini看起来像这样:
../Eclipse/plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.401.v20161122-1740
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/bin
-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Dosgi.requiredJavaVersion=1.8
-Xms1024m
-Xmx4048m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Dsun.zip.disableMemoryMapping=true
尝试增加记忆力。没有帮助。提前谢谢。
答案 0 :(得分:0)
这是一个已知问题,已在Eclipse Oxygen中修复:
Eclipse bug 502711 - [Cocoa][10.12] crashes on „macOS Sierra“ related to NSCopyBits