2

Two weeks ago my game (made with Unity) on Google Play Store started to report so many crashes, I don't know what might be the issue.

"main" tid=1 Native "main" prio=5 tid=1 Native
  | group="main" sCount=1 dsCount=0 flags=1 obj=0x73960618 self=0xecf6f000
  | sysTid=28247 nice=-4 cgrp=default sched=0/0 handle=0xf1a014bc
  | state=S schedstat=( 2314581326 753030573 4325 ) utm=164 stm=66 core=1 HZ=100
  | stack=0xff11e000-0xff120000 stackSize=8MB
  | held mutexes=
  #00  pc 0000000000018e9c  /system/lib/libc.so (syscall+28)
  #01  pc 000000000004850d  /system/lib/libc.so (_ZL24__pthread_cond_timedwaitP23pthread_cond_internal_tP15pthread_mutex_tbPK8timespec+102)
  #02  pc 0000000000039bb1  /data/app/com.android.chrome-Oy13PXODRGoydMIrhaZcSQ==/base.apk (???)
  at org.chromium.ui.base.WindowAndroid.nativeOnVSync (Native method)
  at org.chromium.ui.base.WindowAndroid.access$700 (WindowAndroid.java:134)
  at org.chromium.ui.base.WindowAndroid$1.onVSync$5166USJ75THMGSJFDLKNAR9FELKIULIJF5N66JBFDPKN8RRI7D52ILG_0 (WindowAndroid.java:16)
  at org.chromium.ui.VSyncMonitor$1.doFrame (VSyncMonitor.java:22)
  at android.view.Choreographer$CallbackRecord.run (Choreographer.java:909)
  at android.view.Choreographer.doCallbacks (Choreographer.java:723)
  at android.view.Choreographer.doFrame (Choreographer.java:655)
  at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:897)
  at android.os.Handler.handleCallback (Handler.java:789)
  at android.os.Handler.dispatchMessage (Handler.java:98)
  at android.os.Looper.loop (Looper.java:164)
  at android.app.ActivityThread.main (ActivityThread.java:6938)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
Jon Goodwin
  • 9,053
  • 5
  • 35
  • 54
CodeLazarus
  • 73
  • 1
  • 11

1 Answers1

1

ANR is displayed if:

  • No response to an input event (such as key press or screen touch events) within 5 seconds.
  • A BroadcastReceiver hasn't finished executing within 10 seconds.

Check all your BroadcastReceivers, Serviced and Activities to find if you are running long process on Main Thread for longer duration and exceeding the threshold. Do note that BroadcastReceiver execute code in main thread.

You can also search if you are using Thread.sleep() anywhere in the code. You can find more information here

Sagar
  • 23,903
  • 4
  • 62
  • 62
  • Thanks for explaining it Sagar. This also started to happen after i integrated Facebook events in the app/game. This was integrated dependecy "com.facebook.android:facebook-android-sdk:4.30.0" – CodeLazarus May 10 '18 at 09:24
  • Check if you are performing long process when an event is triggered. – Sagar May 10 '18 at 09:27
  • No, this is not right. If the main thread is occupied by the callstack of a foreign library it is that library's fault. The only way it could not be your fault is if you had a **shared synchronization point** (mutex / semaphore) between your app's code and the library code and your party would hold that point unreleased erroneously. That is very unlikely because the library code is pretty much separated hence I conclude the library has put itself into a long-wait state on its own. – foo Jun 18 '18 at 16:24