gpt4 book ai didi

java - fatal error : SIGSEGV everytime I launch Android studio

转载 作者:行者123 更新时间:2023-12-04 19:27:52 27 4
gpt4 key购买 nike

当我尝试启动 android studio 时,出现此错误:

#
# SIGSEGV (0xb) at pc=0x00007f69987bd512, pid=9119, tid=9160
#
# JRE version: OpenJDK Runtime Environment (11.0.10) (build 11.0.10+0-b96-7249189)
# Java VM: OpenJDK 64-Bit Server VM (11.0.10+0-b96-7249189, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x457512] metaspace::BlockFreelist::get_block(unsigned long)+0x1a2
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /home/tiany/core.9119)
#
# An error report file with more information is saved as:
# /root/java_error_in_studio_9119.log
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
Aborted (core dumped)
任何人都可以帮助我吗?
PS:我在 Ubuntu 20.04.2 lts 上使用 openJDK11,当我尝试编译 Java 代码时,有时会出现同样的错误。
提前致谢
---------------  S U M M A R Y ------------

Command Line: -Xms256m -Xmx1280m -XX:ReservedCodeCacheSize=512m -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=50 -XX:CICompilerCount=2 -Dsun.io.useCanonCaches=false -Djdk.http.auth.tunneling.disabledSchemes="" -Djdk.attach.allowAttachSelf=true -Djdk.module.illegalAccess.silent=true -Dkotlinx.coroutines.debug=off -Djna.nosys=true -Djna.boot.library.path= -Didea.vendor.name=Google -Dsun.tools.attach.tmp.only=true -XX:ErrorFile=/root/java_error_in_studio_%p.log -XX:HeapDumpPath=/root/java_error_in_studio_.hprof -Didea.vendor.name=Google -Didea.paths.selector=AndroidStudio2020.3 -Djb.vmOptionsFile=/usr/local/android-studio/bin/studio64.vmoptions -Didea.platform.prefix=AndroidStudio -Didea.jre.check=true com.intellij.idea.Main

Host: Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz, 4 cores, 3G, Ubuntu 20.04.3 LTS
Time: Mon Sep 27 12:35:42 2021 MDT elapsed time: 3.271945 seconds (0d 0h 0m 3s)

Current thread (0x000000000261e800): JavaThread "ApplicationImpl pooled thread 6" [_thread_in_vm, id=9160, stack(0x00007f68fc023000,0x00007f68fc124000)]

Stack: [0x00007f68fc023000,0x00007f68fc124000], sp=0x00007f68fc11f4b0, free space=1009k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x457512] metaspace::BlockFreelist::get_block(unsigned long)+0x1a2
V [libjvm.so+0xb379aa] metaspace::SpaceManager::allocate(unsigned long)+0x8a
V [libjvm.so+0xa1ab75] Metaspace::allocate(ClassLoaderData*, unsigned long, MetaspaceObj::Type, Thread*)+0x75
V [libjvm.so+0x5e40c7] ConstantPool::allocate(ClassLoaderData*, int, Thread*)+0x87
V [libjvm.so+0x5570c5] ClassFileParser::parse_stream(ClassFileStream const*, Thread*)+0x575
V [libjvm.so+0x556b10] ClassFileParser::ClassFileParser(ClassFileStream*, Symbol*, ClassLoaderData*, Handle, InstanceKlass const*, GrowableArray<Handle>*, ClassFileParser::Publicity, Thread*)+0x290
V [libjvm.so+0x8fce74] KlassFactory::create_from_stream(ClassFileStream*, Symbol*, ClassLoaderData*, Handle, InstanceKlass const*, GrowableArray<Handle>*, Thread*)+0xb4
V [libjvm.so+0xb9bfc1] SystemDictionary::resolve_from_stream(Symbol*, Handle, Handle, ClassFileStream*, Thread*)+0x221
V [libjvm.so+0x802567] jvm_define_class_common(JNIEnv_*, char const*, _jobject*, signed char const*, int, _jobject*, char const*, Thread*)+0x2f7
V [libjvm.so+0x80272b] JVM_DefineClassWithSource+0x11b
C [libjava.so+0xcd4e] Java_java_lang_ClassLoader_defineClass1+0x1be
J 1391 java.lang.ClassLoader.defineClass1(Ljava/lang/ClassLoader;Ljava/lang/String;[BIILjava/security/ProtectionDomain;Ljava/lang/String;)Ljava/lang/Class; java.base@11.0.10 (0 bytes) @ 0x00007f697ffdf0ea [0x00007f697ffdefc0+0x000000000000012a]
J 2368 c1 java.lang.ClassLoader.defineClass(Ljava/lang/String;[BIILjava/security/ProtectionDomain;)Ljava/lang/Class; java.base@11.0.10 (43 bytes) @ 0x00007f6970686f24 [0x00007f6970686e00+0x0000000000000124]
J 1913 c1 com.intellij.util.lang.UrlClassLoader._defineClass(Ljava/lang/String;[B)Ljava/lang/Class; (10 bytes) @ 0x00007f69705baaac [0x00007f69705baa40+0x000000000000006c]
J 2449 c1 com.intellij.util.lang.UrlClassLoader.defineClass(Ljava/lang/String;Lcom/intellij/util/lang/Resource;)Ljava/lang/Class; (148 bytes) @ 0x00007f69706b7374 [0x00007f69706b7020+0x0000000000000354]
J 1895 c1 com.intellij.util.lang.UrlClassLoader._findClass(Ljava/lang/String;)Ljava/lang/Class; (59 bytes) @ 0x00007f69705b5594 [0x00007f69705b5340+0x0000000000000254]
J 1894 c1 com.intellij.util.lang.UrlClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; (21 bytes) @ 0x00007f69705b4ec4 [0x00007f69705b4e60+0x0000000000000064]
J 1112 c1 java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; java.base@11.0.10 (122 bytes) @ 0x00007f6970439b2c [0x00007f6970439880+0x00000000000002ac]
J 755 c1 java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class; java.base@11.0.10 (7 bytes) @ 0x00007f697036353c [0x00007f6970363440+0x00000000000000fc]
v ~StubRoutines::call_stub
堆栈槽到内存映射:
sp + 0 插槽的堆栈:0x00007f6994387480 指向未知的可读内存:0x00007f690c0dc201 | 01 c2 0d 0c 69 7f 00 00
sp + 1 个插槽的堆栈:0x00007f6994391190 指向未知的可读内存:0x00007f699438e830 | 30 e8 38 94 69 7f 00 00
sp + 2 个插槽的堆栈:0x0000000000000384 是未知值
sp + 3 个插槽的堆栈:0x00007f6994306870 指向未知的可读内存:0x00007f6994387480 | 80 74 38 94 69 7f 00 00
sp + 4 个插槽的堆栈:0x00007f68fc11f510 指向线程堆栈:0x000000000261e800
堆栈在 sp + 5 个插槽: 0x00007f6998e9d9aa: 在/usr/local/android-studio/jre/lib/server/libjvm.so 在 0x00007f6998366000
sp + 6 个插槽的堆栈:0x00007f6994306840 指向未知的可读内存:0x00007f6900000000 | 00 00 00 00 69 7f 00 00
sp + 7 个插槽的堆栈:0x0 为 NULL

最佳答案

更新到最新的 Java 版本并使用它进行编译。 (目前是 JDK 17)。如果问题仍然存在,请发布完整的错误日志。另一种解决方案可能是设置一个名为 LD_BIND_NOW 的环境属性。到 1
使用bash,你可以这样做$ export LD_BIND_NOW=1下载链接:
window x64:
https://download.oracle.com/java/17/latest/jdk-17_windows-x64_bin.exe
Linux x64:
https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.tar.gz
苹果系统:
https://download.oracle.com/java/17/latest/jdk-17_macos-aarch64_bin.dmg

关于java - fatal error : SIGSEGV everytime I launch Android studio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69344648/

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