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

GameActivity onPauseNative ANR #17511

Open
KaiFengGame opened this issue Aug 7, 2024 · 1 comment
Open

GameActivity onPauseNative ANR #17511

KaiFengGame opened this issue Aug 7, 2024 · 1 comment
Assignees
Labels
Bug Env: Android Env: Native General issue on all native platforms including iOS, Android, MacOS, Windows
Milestone

Comments

@KaiFengGame
Copy link

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

@bofeng-song
Copy link
Contributor

@KaiFengGame Please refer to the changes in this PR.

@minggo minggo added this to the 3.8.6 milestone Dec 12, 2024
@minggo minggo added Env: Native General issue on all native platforms including iOS, Android, MacOS, Windows Env: Android and removed Needs Triage Needs to be assigned by the team labels Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Env: Android Env: Native General issue on all native platforms including iOS, Android, MacOS, Windows
Projects
None yet
Development

No branches or pull requests

3 participants