基于3.7.4编译的Android应用,在Android 9.0系统上面 退出到后台的时候,高复现ANR。
一下是anr堆栈信息
“main” prio=5 tid=1 Native
| group=“main” sCount=1 dsCount=0 flags=1 obj=0x754396c0 self=0xea6f5000
| sysTid=15403 nice=-10 cgrp=default sched=0/0 handle=0xeaad2494
| state=S schedstat=( 2857799366 586555359 6833 ) utm=235 stm=50 core=1 HZ=100
| stack=0xff5dd000-0xff5df000 stackSize=8MB
| held mutexes=
kernel: (couldn’t read /proc/self/task/15403/stack)
native: #00 pc 00019d40 /system/lib/libc.so (syscall+32)
native: #01 pc 0001d1e7 /system/lib/libc.so (__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+86)
native: #02 pc 00062f23 /system/lib/libc.so (pthread_cond_timedwait+82)
native: #03 pc 007b5625 /data/app/com.study.sudoku-M9pK8KCOiJTlzYxdpj0gEA==/lib/arm/libcocos.so (???)
native: #04 pc 00417279 /system/lib/libart.so (offset 25f000) (art_quick_generic_jni_trampoline+40)
native: #05 pc 00412d75 /system/lib/libart.so (offset 25f000) (art_quick_invoke_stub_internal+68)
native: #06 pc 003ec399 /system/lib/libart.so (offset 25f000) (art_quick_invoke_stub+224)
native: #07 pc 000a1815 /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+136)
native: #08 pc 001ea379 /system/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+236)
native: #09 pc 001e4e67 /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+814)
native: #10 pc 003e6ff3 /system/lib/libart.so (offset 25f000) (MterpInvokeVirtual+442)
native: #11 pc 00405b14 /system/lib/libart.so (offset 25f000) (ExecuteMterpImpl+14228)
native: #12 pc 005da23a [anon:libc_malloc] (com.google.androidgamesdk.GameActivity.onStop+10)
native: #13 pc 001c95e3 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3314419454+378)
native: #14 pc 001cdcc9 /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+152)
native: #15 pc 001e4e4f /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+790)
native: #16 pc 003e750f /system/lib/libart.so (offset 25f000) (MterpInvokeSuper+1098)
native: #17 pc 00405b94 /system/lib/libart.so (offset 25f000) (ExecuteMterpImpl+14356)
native: #18 pc 0054e364 [anon:libc_malloc] (com.cocos.lib.CocosActivity.onStop)
native: #19 pc 001c95e3 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3314419454+378)
native: #20 pc 001cdc0f /system/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+82)
native: #21 pc 003daad9 /system/lib/libart.so (offset 25f000) (artQuickToInterpreterBridge+880)
native: #22 pc 004172ff /system/lib/libart.so (offset 25f000) (art_quick_to_interpreter_bridge+30)
at com.google.androidgamesdk.GameActivity.onStopNative(Native method)
at com.google.androidgamesdk.GameActivity.onStop(SourceFile:2)
at com.cocos.lib.CocosActivity.onStop(SourceFile:1)