GameActivity onPauseNative ANR #17511
Labels
Bug
Env: Android
Env: Native
General issue on all native platforms including iOS, Android, MacOS, Windows
Milestone
Cocos Creator version
3.6.1
System information
Android
Issue description
谷歌上反馈的,我们多个项目都这样。好像是Java那边的生命周期引起的ANR问题。
Relevant error log output
#00 pc 0x0000000000058240 /apex/com.android.runtime/lib64/bionic/libc.so (syscall+32)
#1 pc 0x000000000005d010 /apex/com.android.runtime/lib64/bionic/libc.so (__futex_wait_ex+144)
此原生同步例程正阻塞主线程,进而导致 ANR。 了解详情
#2 pc 0x00000000000c9084 /apex/com.android.runtime/lib64/bionic/libc.so (pthread_cond_timedwait+132)
#3 pc 0x000000000059d200 /data/app/~~RdGOe_NFny5pNDRr00uz_w==/com.shooting.io.zombie.survival.gp-bx2OqzRBpX5AO6ZuJtir-A==/split_config.arm64_v8a.apk (android_app_set_activity_state+1892352) (BuildId: 08103d28bb7af9524a27fe99397919106b148089)
at com.google.androidgamesdk.GameActivity.onPauseNative (Native method)
at com.google.androidgamesdk.GameActivity.onPause (GameActivity.java:304)
at com.cocos.lib.CocosActivity.onPause (CocosActivity.java:138)
at com.cocos.game.AppActivity.onPause (AppActivity.java:544)
at android.app.Activity.performPause (Activity.java:8842)
at android.app.Instrumentation.callActivityOnPause (Instrumentation.java:1661)
at android.app.ActivityThread.performPauseActivityIfNeeded (ActivityThread.java:5444)
at android.app.ActivityThread.performPauseActivity (ActivityThread.java:5405)
at android.app.ActivityThread.handlePauseActivity (ActivityThread.java:5357)
at android.app.servertransaction.PauseActivityItem.execute (PauseActivityItem.java:48)
at android.app.servertransaction.ActivityTransactionItem.execute (ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:180)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:98)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2550)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:243)
at android.os.Looper.loop (Looper.java:338)
at android.app.ActivityThread.main (ActivityThread.java:8446)
at java.lang.reflect.Method.invoke (Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:589)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1055)
Steps to reproduce
none
Minimal reproduction project
none
The text was updated successfully, but these errors were encountered: