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

请问onPauseNative导致ANR该怎么解决? #8

Open
lihuilai opened this issue Jun 23, 2023 · 8 comments
Open

请问onPauseNative导致ANR该怎么解决? #8

lihuilai opened this issue Jun 23, 2023 · 8 comments

Comments

@lihuilai
Copy link

"main" prio=5 tid=1 Native
| group="main" sCount=1 ucsCount=0 flags=1 obj=0x71eb7fe8 self=0xb40000738b528b20
| sysTid=25450 nice=0 cgrp=foreground sched=0/0 handle=0x74d190b4f8
| state=S schedstat=( 2059835998 1913759553 4442 ) utm=143 stm=62 core=5 HZ=100
| stack=0x7fe4362000-0x7fe4364000 stackSize=8188KB
| held mutexes=
native: #00 pc 000000000004c4f0 /apex/com.android.runtime/lib64/bionic/libc.so (syscall+32) (BuildId: 3cf600896578484f9ee24df4f1e36b7d)
native: #1 pc 0000000000050f70 /apex/com.android.runtime/lib64/bionic/libc.so (__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144) (BuildId: 3cf600896578484f9ee24df4f1e36b7d)
native: #2 pc 00000000000b2bcc /apex/com.android.runtime/lib64/bionic/libc.so (pthread_cond_timedwait+140) (BuildId: 3cf600896578484f9ee24df4f1e36b7d)
native: #3 pc 00000000003a3848 /data/app/~~_EL7ET_Eg2fUA_nBMqFNIA==/com.ygame.newasia.sea.gp-xX4v5ZW-jGz2azm4NHv13Q==/split_config.arm64_v8a.apk (offset 32000) (???) (BuildId: 315b38cfed912b37778df07fe672e35302abad61)
at com.google.androidgamesdk.GameActivity.onPauseNative(Native method)
at com.google.androidgamesdk.GameActivity.onPause(GameActivity.java:2)
at com.cocos.lib.CocosActivity.onPause(CocosActivity.java:1)
at com.cocos.game.AppActivity.onPause(AppActivity.java:2)
at android.app.Activity.performPause(Activity.java:8553)
at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1580)
at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:5378)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:5339)
at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:5286)
at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:47)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2441)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:233)
at android.os.Looper.loop(Looper.java:334)
at android.app.ActivityThread.main(ActivityThread.java:8396)
at java.lang.reflect.Method.invoke(Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1068)

@bofeng-song
Copy link
Collaborator

Does it often recur?
Is there a reproducible demo?
Have you changed the engine code?

@lihuilai
Copy link
Author

1.bugly上统计的这个地方ANR占比非常高,还有一些其它的GameActivity中的生命周期函数
2.线上不方便抽取demo出来
3.有修改过引擎代码,一般都是小修改的bug和合并官方修复bug的pr

@bofeng-song
Copy link
Collaborator

Which version of the engine are you using?

@lihuilai
Copy link
Author

3.6.0

@bofeng-song
Copy link
Collaborator

@lihuilai
Copy link
Author

比对过,一模一样

@bofeng-song
Copy link
Collaborator

Without a reproducible demo, there are no better suggestions at the moment.

@minggo
Copy link

minggo commented Jun 27, 2023

@lihuilai please use english in future. Thanks.

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

3 participants