gpt4 book ai didi

java - 尝试运行 Junit 测试用例时 JVM 崩溃

转载 作者:太空宇宙 更新时间:2023-11-04 10:52:18 25 4
gpt4 key购买 nike

尝试运行 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

也尝试过增加内存。没有帮助。提前致谢。

最佳答案

这是一个已知问题,已在 Eclipse Oxygen 中修复:

Eclipse bug 502711 - [Cocoa][10.12] crashes on „macOS Sierra“ related to NSCopyBits

Upgrading at least the Eclipse platform应该可以解决问题。

关于java - 尝试运行 Junit 测试用例时 JVM 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47675656/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com