Android Studio 打开Profiler后App闪退
环境
Android Studio 4.1.1
Android 10
错误信息:
2020-12-24 16:06:21.870 3001-3001/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2020-12-24 16:06:21.870 3001-3001/? A/DEBUG: Build fingerprint: 'HUAWEI/BAH3-W09/HWBAH3:10/HUAWEIBAH3-W09/10.1.0.190C00:user/release-keys'
2020-12-24 16:06:21.870 3001-3001/? A/DEBUG: Revision: '0'
2020-12-24 16:06:21.870 3001-3001/? A/DEBUG: ABI: 'arm64'
2020-12-24 16:06:21.870 3001-3001/? A/DEBUG: Timestamp: 2020-12-24 16:06:21+0800
2020-12-24 16:06:21.870 3001-3001/? A/DEBUG: pid: 2694, tid: 2761, name: LeakCanary-Heap >>> com.ynbyjk.mis <<<
2020-12-24 16:06:21.870 3001-3001/? A/DEBUG: uid: 10246
2020-12-24 16:06:21.870 3001-3001/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10
2020-12-24 16:06:21.870 3001-3001/? A/DEBUG: Cause: null pointer dereference
2020-12-24 16:06:21.870 3001-3001/? A/DEBUG: x0 0000007aa70bae00 x1 0000007a36bf9018 x2 0000000000000008 x3 000000007121cbc0
2020-12-24 16:06:21.870 3001-3001/? A/DEBUG: x4 00000000175c1f34 x5 0000000013a5bdec x6 00000000176a76e0 x7 00000000176a76e0
2020-12-24 16:06:21.870 3001-3001/? A/DEBUG: x8 0000000000000000 x9 ce666c83d2d5a3ee x10 0000000052c00000 x11 0000000000000008
2020-12-24 16:06:21.870 3001-3001/? A/DEBUG: x12 000000000000000b x13 175c01f800000000 x14 000be37ec970d68d x15 00001567f095474e
2020-12-24 16:06:21.870 3001-3001/? A/DEBUG: x16 0000007aa6ff2e00 x17 0000007b2a7c4b40 x18 0000007a368cc000 x19 0000007a36bf9018
2020-12-24 16:06:21.870 3001-3001/? A/DEBUG: x20 000000007121cbc0 x21 0000000000000008 x22 0000000071995918 x23 00000000719940b8
2020-12-24 16:06:21.870 3001-3001/? A/DEBUG: x24 0000000000000028 x25 0000000000002990 x26 0000007a36bfc020 x27 0000000000001860
2020-12-24 16:06:21.870 3001-3001/? A/DEBUG: x28 00000000719940d0 x29 0000007a36bf9000
2020-12-24 16:06:21.870 3001-3001/? A/DEBUG: sp 0000007a36bf8f90 lr 0000007aa6c33730 pc 0000007aa6c3370c2020-12-24 16:06:21.965 3001-3001/? A/DEBUG: backtrace:
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #00 pc 000000000022f70c /apex/com.android.runtime/lib64/libart.so (_ZN3art6mirror6Object15VisitReferencesILb1ELNS_17VerifyObjectFlagsE0ELNS_17ReadBarrierOptionE1ENS_2gc9collector17ConcurrentCopying16RefFieldsVisitorILb0EEES9_EEvRKT2_RKT3_+2828) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #01 pc 000000000021f4d4 /apex/com.android.runtime/lib64/libart.so (art::gc::collector::ConcurrentCopying::ImmuneSpaceScanObjVisitor::Callback(art::mirror::Object*, void*)+112) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #02 pc 000000000020d94c /apex/com.android.runtime/lib64/libart.so (art::gc::accounting::ModUnionTableReferenceCache::VisitObjects(void (*)(art::mirror::Object*, void*), void*)+292) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #03 pc 000000000021a1a0 /apex/com.android.runtime/lib64/libart.so (art::gc::collector::ConcurrentCopying::CopyingPhase()+1236) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #04 pc 0000000000218088 /apex/com.android.runtime/lib64/libart.so (art::gc::collector::ConcurrentCopying::RunPhases()+1148) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #05 pc 000000000023670c /apex/com.android.runtime/lib64/libart.so (art::gc::collector::GarbageCollector::Run(art::gc::GcCause, bool)+288) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #06 pc 0000000000255780 /apex/com.android.runtime/lib64/libart.so (art::gc::Heap::CollectGarbageInternal(art::gc::collector::GcType, art::gc::GcCause, bool)+3196) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #07 pc 0000000000004e34 /apex/com.android.runtime/lib64/libopenjdkjvm.so (JVM_GC+112) (BuildId: 8e02f84bdc2e629cf090f4f28f23e432)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #08 pc 00000000000ef5dc /system/framework/arm64/boot.oat (art_jni_trampoline+124) (BuildId: 5d8aba4b68aab1945c5d5d592604f04fdaaa4adc)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #09 pc 0000000000143334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #10 pc 00000000001521a4 /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+252) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #11 pc 00000000002ee2d0 /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #12 pc 00000000002e95a0 /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+912) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #13 pc 00000000002f6564 /apex/com.android.runtime/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+13508) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #14 pc 000000000014ebd8 /apex/com.android.runtime/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #15 pc 00000000000e2acc /apex/com.android.runtime/javalib/core-oj.jar (java.lang.Runtime.gc)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #16 pc 00000000002bf008 /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.8556287075661799849+492) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #17 pc 00000000002c4cf8 /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+204) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #18 pc 00000000002e9584 /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+884) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #19 pc 00000000002f7dd8 /apex/com.android.runtime/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+19768) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #20 pc 000000000014ebd8 /apex/com.android.runtime/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #21 pc 000000000037cc54 [anon:dalvik-classes.dex extracted in memory from /data/app/com.ynbyjk.mis-D0zDkXky4MrhR4EURzxCkg==/base.apk] (leakcanary.GcTrigger$Default.runGc)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #22 pc 00000000002bf008 /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.8556287075661799849+492) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #23 pc 00000000002c4cf8 /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+204) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #24 pc 00000000002e9584 /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+884) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #25 pc 00000000002f7f3c /apex/com.android.runtime/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+20124) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #26 pc 000000000014ebd8 /apex/com.android.runtime/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #27 pc 00000000003831f4 [anon:dalvik-classes.dex extracted in memory from /data/app/com.ynbyjk.mis-D0zDkXky4MrhR4EURzxCkg==/base.apk] (leakcanary.internal.HeapDumpTrigger.checkRetainedObjects)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #28 pc 00000000002bf008 /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.8556287075661799849+492) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #29 pc 00000000002c4cf8 /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+204) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #30 pc 00000000002e9584 /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+884) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #31 pc 00000000002f6564 /apex/com.android.runtime/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+13508) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #32 pc 000000000014ebd8 /apex/com.android.runtime/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #33 pc 0000000000383164 [anon:dalvik-classes.dex extracted in memory from /data/app/com.ynbyjk.mis-D0zDkXky4MrhR4EURzxCkg==/base.apk] (leakcanary.internal.HeapDumpTrigger.access$checkRetainedObjects)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #34 pc 00000000002bf008 /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.8556287075661799849+492) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #35 pc 00000000002c4cf8 /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+204) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #36 pc 00000000002e9584 /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+884) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #37 pc 00000000002f6b14 /apex/com.android.runtime/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+14964) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #38 pc 000000000014ebd8 /apex/com.android.runtime/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #39 pc 0000000000382c0c [anon:dalvik-classes.dex extracted in memory from /data/app/com.ynbyjk.mis-D0zDkXky4MrhR4EURzxCkg==/base.apk] (leakcanary.internal.HeapDumpTrigger$scheduleRetainedObjectCheck$1.run)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #40 pc 00000000002bf008 /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.8556287075661799849+492) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #41 pc 00000000005a76c8 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1012) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #42 pc 000000000014c468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #43 pc 000000000208b584 /memfd:/jit-cache (deleted) (android.os.Handler.handleCallback+68)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #44 pc 0000000002081840 /memfd:/jit-cache (deleted) (android.os.Handler.dispatchMessage+64)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #45 pc 0000000002075630 /memfd:/jit-cache (deleted) (android.os.Looper.loop+1264)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #46 pc 000000000014363c /apex/com.android.runtime/lib64/libart.so (art_quick_osr_stub+60) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #47 pc 0000000000342940 /apex/com.android.runtime/lib64/libart.so (art::jit::Jit::MaybeDoOnStackReplacement(art::Thread*, art::ArtMethod*, unsigned int, int, art::JValue*)+1660) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #48 pc 00000000002f61f8 /apex/com.android.runtime/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+12632) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #49 pc 000000000014ebd8 /apex/com.android.runtime/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #50 pc 00000000003496c0 /system/framework/framework.jar (android.os.Looper.loop)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #51 pc 00000000005b98f4 /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+1288) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #52 pc 000000000013d994 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #53 pc 000000000031e980 /system/framework/framework.jar (android.os.HandlerThread.run+56)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #54 pc 00000000002bef0c /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.8556287075661799849+240) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #55 pc 00000000005a76c8 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1012) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #56 pc 000000000014c468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #57 pc 0000000000143334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #58 pc 00000000001521a4 /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+252) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #59 pc 00000000004c8448 /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #60 pc 00000000004c94dc /apex/com.android.runtime/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+416) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #61 pc 00000000005094ac /apex/com.android.runtime/lib64/libart.so (art::Thread::CreateCallback(void*)+1176) (BuildId: 696759073fd59cd48df4113ea4815c67)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #62 pc 00000000000cf6f0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: b477272432a697172a3a3da7a0c8addc)
2020-12-24 16:06:21.966 3001-3001/? A/DEBUG: #63 pc 00000000000720e8 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: b477272432a697172a3a3da7a0c8addc)
解决方案:
打开AndroidStudio的Device File Explorer,如下:
找到/data/local/tmp/perfd文件夹,删除它,就可以了。我上面的是已经删除过的。为什么会这样,不太清楚。如果你担心删除有问题,可以先备份下,再删除。