Android ANR when calling OnPause in libc.so

34 Views Asked by At

I am getting reports of ANR from Google for my game. The game is built using NDK. Here are 2 similar reports I am getting from Google:

"main" tid=1 Native
  #00  pc 0x0000000000057880  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+32)
  #01  pc 0x000000000005c5e0  /apex/com.android.runtime/lib64/bionic/libc.so (__futex_wait_ex+148)
  #02  pc 0x00000000000c2a74  /apex/com.android.runtime/lib64/bionic/libc.so (pthread_cond_wait+80)
  #03  pc 0x00000000021f4ba8  /data/app/~~QeAaupM6gNCsBc3EBhiWeA==/<Removed>-Mt_k1KKiYYaGN8bzUlTvEg==/base.apk
  at android.app.NativeActivity.onPauseNative (Native method)
  at android.app.NativeActivity.onPause (NativeActivity.java:205)
  at android.app.Activity.performPause (Activity.java:9150)
  at android.app.Instrumentation.callActivityOnPause (Instrumentation.java:1657)
  at android.app.ActivityThread.performPauseActivityIfNeeded (ActivityThread.java:5769)
  at android.app.ActivityThread.performPauseActivity (ActivityThread.java:5730)
  at android.app.ActivityThread.handlePauseActivity (ActivityThread.java:5682)
  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:2685)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:230)
  at android.os.Looper.loop (Looper.java:319)
  at android.app.ActivityThread.main (ActivityThread.java:8893)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:608)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1103)

The other:

"main" tid=1 Native
  #00  pc 0x000000000004fa70  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+32)
  #01  pc 0x0000000000054538  /apex/com.android.runtime/lib64/bionic/libc.so (__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+148)
  #02  pc 0x00000000000ba9fc  /apex/com.android.runtime/lib64/bionic/libc.so (pthread_cond_wait+80)
  #03  pc 0x00000000016672fc  /data/app/~~ejr9AKrwBytDTNmTYxh-7g==/<Removed>-E6Vw2g4KdK669oqAUS8qMA==/lib/arm64/<Removed>.so
  at android.app.NativeActivity.onPauseNative (Native method)
  at android.app.NativeActivity.onPause (NativeActivity.java:205)
  at android.app.Activity.performPause (Activity.java:8778)
  at android.app.Instrumentation.callActivityOnPause (Instrumentation.java:1585)
  at android.app.ActivityThread.performPauseActivityIfNeeded (ActivityThread.java:5707)
  at android.app.ActivityThread.performPauseActivity (ActivityThread.java:5668)
  at android.app.ActivityThread.handlePauseActivity (ActivityThread.java:5620)
  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:2574)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:226)
  at android.os.Looper.loop (Looper.java:313)
  at android.app.ActivityThread.main (ActivityThread.java:8762)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:604)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067)

I have only one activity. Any ideas or help would be appreciated!

I have tried to reproduce this issue but have been unable to.

0

There are 0 best solutions below