Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android studio断点结束后发生crash #76

Open
H2268 opened this issue Aug 14, 2024 · 3 comments
Open

android studio断点结束后发生crash #76

H2268 opened this issue Aug 14, 2024 · 3 comments

Comments

@H2268
Copy link

H2268 commented Aug 14, 2024

Test.zip
image
在截图位置加一个断点,断点结束后app会闪退

@huigll
Copy link

huigll commented Aug 17, 2024

我也发现调试的时候会闪退,可能跟栈回溯失败有关:

jni_internal.cc:654] JNI FatalError called: JDWP setting up notify frame pop, jvmtiError=JVMTI_ERROR_OPAQUE_FRAME(32)
runtime.cc:655] Runtime aborting...
runtime.cc:655] All threads:
runtime.cc:655] DALVIK THREADS (20):
runtime.cc:655] "main" prio=10 tid=1 Runnable
runtime.cc:655] | group="" sCount=0 dsCount=0 flags=0 obj=0x70b9cfe0 self=0xdb505410
runtime.cc:655] | sysTid=24885 nice=-10 cgrp=default sched=0/0 handle=0xe86fd470
runtime.cc:655] | state=R schedstat=( 4616621302 229835728 900 ) utm=452 stm=9 core=7 HZ=100
runtime.cc:655] | stack=0xff371000-0xff373000 stackSize=8192KB
runtime.cc:655] | held mutexes= "abort lock" "mutator lock"(shared held)
runtime.cc:655] native: #00 pc 0036f249 /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+76)
runtime.cc:655] native: #01 pc 0043e9af /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool, BacktraceMap*, bool) const+386)
runtime.cc:655] native: #02 pc 0043a36f /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool, BacktraceMap*, bool) const+34)
runtime.cc:655] native: #03 pc 00456f67 /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::DumpCheckpoint::Run(art::Thread*)+666)
runtime.cc:655] native: #04 pc 00452533 /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+354)
runtime.cc:655] native: #05 pc 004518e1 /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool)+1092)
runtime.cc:655] native: #06 pc 003fd557 /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::Runtime::Abort(char const*)+1442)
runtime.cc:655] native: #07 pc 0000d97f /system/lib/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_3::__invoke(char const*)+46)
runtime.cc:655] native: #08 pc 0000d2b3 /system/lib/libbase.so (android::base::LogMessage::~LogMessage()+222)
runtime.cc:655] native: #09 pc 002f42bd /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::JNI<true>::FatalError(_JNIEnv*, char const*)+116)
runtime.cc:655] native: #10 pc 00277699 /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::(anonymous namespace)::CheckJNI::FatalError(_JNIEnv*, char const*)+556)
runtime.cc:655] native: #11 pc 000186bf /apex/com.android.art/lib/libjdwp.so (debugInit_exit+298)
runtime.cc:655] native: #12 pc 000237e3 /apex/com.android.art/lib/libjdwp.so (stepControl_handleStep+822)
runtime.cc:655] native: #13 pc 0001a6e1 /apex/com.android.art/lib/libjdwp.so (eventFilterRestricted_passesFilter+424)
runtime.cc:655] native: #14 pc 0001ee9b /apex/com.android.art/lib/libjdwp.so (event_callback+570)
runtime.cc:655] native: #15 pc 0001bff7 /apex/com.android.art/lib/libjdwp.so (cbSingleStep+294)
runtime.cc:655] native: #16 pc 000351cb /apex/com.android.art/lib/libopenjdkjvmti.so (openjdkjvmti::JvmtiMethodTraceListener::DexPcMoved(art::Thread*, art::Handle<art::mirror::Object>, art::ArtMethod*, unsigned int)+1034)
runtime.cc:655] native: #17 pc 0022b71f /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::instrumentation::Instrumentation::DexPcMovedEventImpl(art::Thread*, art::ObjPtr<art::mirror::Object>, art::ArtMethod*, unsigned int) const+110)
runtime.cc:655] native: #18 pc 000e8f01 /apex/com.android.art/lib/libart.so (art::interpreter::InstructionHandler<false, false, (art::Instruction::Format)26>::DoDexPcMoveEvent(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame const&, unsigned int, art::instrumentation::Instrumentation const*, art::JValue*)+144)
runtime.cc:655] native: #19 pc 00104183 /apex/com.android.art/lib/libart.so (void art::interpreter::ExecuteSwitchImplCpp<true, false>(art::interpreter::SwitchImplContext*)+41498)
runtime.cc:655] native: #20 pc 000d8e75 /apex/com.android.art/lib/libart.so (ExecuteSwitchImplAsm+4)
runtime.cc:655] native: #21 pc 00028220 [anon:dalvik-classes.dex extracted in memory from /data/app/~~sLHRyZ6b--2zBDrSe0eq_w==/top.canyie.pine.examples-6Qrlw9_qvQb9MDsBBeKRqQ==/base.apk] (top.canyie.pine.examples.test.Arg4Test.target)
runtime.cc:655] native: #22 pc 0022fbf5 /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.11411978387986796176)+180)
runtime.cc:655] native: #23 pc 002363ad /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+120)
runtime.cc:655] native: #24 pc 004cca93 /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (artQuickToInterpreterBridge+698)
runtime.cc:655] native: #25 pc 000d8361 /apex/com.android.art/lib/libart.so (art_quick_to_interpreter_bridge+32)
runtime.cc:655] native: #26 pc 000d845d /apex/com.android.art/lib/libart.so (???)
runtime.cc:655] at top.canyie.pine.examples.test.Arg4Test.target(Native method)
runtime.cc:655] at top.canyie.pine.examples.test.Arg4Test.testImpl(Arg4Test.java:16)
runtime.cc:655] at top.canyie.pine.examples.test.Test.run(Test.java:55)
runtime.cc:655] at top.canyie.pine.examples.test.TestItem.run(TestItem.java:21)
runtime.cc:655] at top.canyie.pine.examples.MainActivity.onItemClick(MainActivity.java:65)

可以看到是/apex/com.android.art/lib/libjdwp.so (cbSingleStep+294) 单步执行时,会crash.

@H2268
Copy link
Author

H2268 commented Aug 19, 2024

我也发现调试的时候会闪退,可能跟栈回溯失败有关:

jni_internal.cc:654] JNI FatalError called: JDWP setting up notify frame pop, jvmtiError=JVMTI_ERROR_OPAQUE_FRAME(32) runtime.cc:655] Runtime aborting... runtime.cc:655] All threads: runtime.cc:655] DALVIK THREADS (20): runtime.cc:655] "main" prio=10 tid=1 Runnable runtime.cc:655] | group="" sCount=0 dsCount=0 flags=0 obj=0x70b9cfe0 self=0xdb505410 runtime.cc:655] | sysTid=24885 nice=-10 cgrp=default sched=0/0 handle=0xe86fd470 runtime.cc:655] | state=R schedstat=( 4616621302 229835728 900 ) utm=452 stm=9 core=7 HZ=100 runtime.cc:655] | stack=0xff371000-0xff373000 stackSize=8192KB runtime.cc:655] | held mutexes= "abort lock" "mutator lock"(shared held) runtime.cc:655] native: #00 pc 0036f249 /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+76) runtime.cc:655] native: #01 pc 0043e9af /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool, BacktraceMap*, bool) const+386) runtime.cc:655] native: #02 pc 0043a36f /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool, BacktraceMap*, bool) const+34) runtime.cc:655] native: #03 pc 00456f67 /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::DumpCheckpoint::Run(art::Thread*)+666) runtime.cc:655] native: #04 pc 00452533 /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+354) runtime.cc:655] native: #05 pc 004518e1 /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool)+1092) runtime.cc:655] native: #06 pc 003fd557 /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::Runtime::Abort(char const*)+1442) runtime.cc:655] native: #07 pc 0000d97f /system/lib/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_3::__invoke(char const*)+46) runtime.cc:655] native: #08 pc 0000d2b3 /system/lib/libbase.so (android::base::LogMessage::~LogMessage()+222) runtime.cc:655] native: #09 pc 002f42bd /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::JNI<true>::FatalError(_JNIEnv*, char const*)+116) runtime.cc:655] native: #10 pc 00277699 /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::(anonymous namespace)::CheckJNI::FatalError(_JNIEnv*, char const*)+556) runtime.cc:655] native: #11 pc 000186bf /apex/com.android.art/lib/libjdwp.so (debugInit_exit+298) runtime.cc:655] native: #12 pc 000237e3 /apex/com.android.art/lib/libjdwp.so (stepControl_handleStep+822) runtime.cc:655] native: #13 pc 0001a6e1 /apex/com.android.art/lib/libjdwp.so (eventFilterRestricted_passesFilter+424) runtime.cc:655] native: #14 pc 0001ee9b /apex/com.android.art/lib/libjdwp.so (event_callback+570) runtime.cc:655] native: #15 pc 0001bff7 /apex/com.android.art/lib/libjdwp.so (cbSingleStep+294) runtime.cc:655] native: #16 pc 000351cb /apex/com.android.art/lib/libopenjdkjvmti.so (openjdkjvmti::JvmtiMethodTraceListener::DexPcMoved(art::Thread*, art::Handle<art::mirror::Object>, art::ArtMethod*, unsigned int)+1034) runtime.cc:655] native: #17 pc 0022b71f /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::instrumentation::Instrumentation::DexPcMovedEventImpl(art::Thread*, art::ObjPtr<art::mirror::Object>, art::ArtMethod*, unsigned int) const+110) runtime.cc:655] native: #18 pc 000e8f01 /apex/com.android.art/lib/libart.so (art::interpreter::InstructionHandler<false, false, (art::Instruction::Format)26>::DoDexPcMoveEvent(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame const&, unsigned int, art::instrumentation::Instrumentation const*, art::JValue*)+144) runtime.cc:655] native: #19 pc 00104183 /apex/com.android.art/lib/libart.so (void art::interpreter::ExecuteSwitchImplCpp<true, false>(art::interpreter::SwitchImplContext*)+41498) runtime.cc:655] native: #20 pc 000d8e75 /apex/com.android.art/lib/libart.so (ExecuteSwitchImplAsm+4) runtime.cc:655] native: #21 pc 00028220 [anon:dalvik-classes.dex extracted in memory from /data/app/~~sLHRyZ6b--2zBDrSe0eq_w==/top.canyie.pine.examples-6Qrlw9_qvQb9MDsBBeKRqQ==/base.apk] (top.canyie.pine.examples.test.Arg4Test.target) runtime.cc:655] native: #22 pc 0022fbf5 /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.11411978387986796176)+180) runtime.cc:655] native: #23 pc 002363ad /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+120) runtime.cc:655] native: #24 pc 004cca93 /apex/com.android.art/lib/libart.so!libart.so (offset 21c000) (artQuickToInterpreterBridge+698) runtime.cc:655] native: #25 pc 000d8361 /apex/com.android.art/lib/libart.so (art_quick_to_interpreter_bridge+32) runtime.cc:655] native: #26 pc 000d845d /apex/com.android.art/lib/libart.so (???) runtime.cc:655] at top.canyie.pine.examples.test.Arg4Test.target(Native method) runtime.cc:655] at top.canyie.pine.examples.test.Arg4Test.testImpl(Arg4Test.java:16) runtime.cc:655] at top.canyie.pine.examples.test.Test.run(Test.java:55) runtime.cc:655] at top.canyie.pine.examples.test.TestItem.run(TestItem.java:21) runtime.cc:655] at top.canyie.pine.examples.MainActivity.onItemClick(MainActivity.java:65)

可以看到是/apex/com.android.art/lib/libjdwp.so (cbSingleStep+294) 单步执行时,会crash.

你现在有啥解决办法吗 @huigll

@huigll
Copy link

huigll commented Aug 20, 2024

不使用studio调试. 就logcat...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants