• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android High ANR Errors

Mataca

Member
Hello! I'm having a lot of ANR errors (some days I cross the google play threshold for bad behavior). The last extensions I put in are:
and

.

The errors according to the SDK are the following:
SDK 26 0.05 %
SDK 27 0.89 % (here is the error)
SDK 28 0.09 %
SDK 29 0.04 %

The errors are (viewed from the google play console in order of number of errors):

" Input dispatching timed out (Waiting because the touched window has not finished processing the input events that were previously delivered to it.)"


"main" prio=5 tid=1 NATIVE

#00 pc 0000000000020598 /system/lib/libc.so (__ioctl+8)
#00 pc 000000000002cf07 /system/lib/libc.so (ioctl+14)
#00 pc 000000000001d3ed /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+140)
#00 pc 000000000001d8d7 /system/lib/libbinder.so (android::IPCThreadState::waitForResponse(android::parcel*, int*)+42)
#00 pc 000000000001dadf /system/lib/libbinder.so (android::IPCThreadState::transact(int, unsigned int, android::parcel const&, android::parcel*, unsigned int)+118)
#00 pc 0000000000019791 /system/lib/libbinder.so (android::BpBinder::transact(unsigned int, android::parcel const&, android::parcel*, unsigned int)+30)
#00 pc 0000000000070e85 /system/lib/libandroid_runtime.so
#00 pc 000000000001db4c /system/lib/libdvm.so (dvmPlatformInvoke+112)
#00 pc 000000000004e003 /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
#00 pc 0000000000026f60 /system/lib/libdvm.so
#00 pc 000000000002deec /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
#00 pc 000000000002b598 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
#00 pc 0000000000060711 /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+392)
#00 pc 0000000000068743 /system/lib/libdvm.so
#00 pc 0000000000026f60 /system/lib/libdvm.so
#00 pc 000000000002deec /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
#00 pc 000000000002b598 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
#00 pc 000000000006042f /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+338)
#00 pc 0000000000049beb /system/lib/libdvm.so
#00 pc 000000000004d247 /system/lib/libandroid_runtime.so
#00 pc 000000000004df6b /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+354)
#00 pc 000000000000105b /system/bin/app_process
#00 pc 000000000000e3eb /system/lib/libc.so (__libc_init+50)
#00 pc 0000000000000d7c /system/bin/app_process
at android.os.BinderProxy.transact (Native Method)
at bi.h (com.google.android.gms.dynamite_measurementdynamite@[email protected] (000302-0):10)
at bf.a (com.google.android.gms.dynamite_measurementdynamite@[email protected] (000302-0):3)
at bh.a (com.google.android.gms.dynamite_measurementdynamite@[email protected] (000302-0))
at az.d (com.google.android.gms.dynamite_measurementdynamite@[email protected] (000302-0))
at bc.handleMessage (com.google.android.gms.dynamite_measurementdynamite@[email protected] (000302-0):28)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:136)
at android.app.ActivityThread.main (ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative (Native Method)
at java.lang.reflect.Method.invoke (Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:811)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:627)
at dalvik.system.NativeStart.main (Native Method)


"pool-2-thread-9" prio=5 tid=11 TIMED_WAIT

at java.lang.Object.wait (Native Method)
at java.lang.Thread.parkFor (Thread.java:1205)
at sun.misc.Unsafe.park (Unsafe.java:325)
at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:197)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos (AbstractQueuedSynchronizer.java:2056)
at java.util.concurrent.LinkedBlockingQueue.poll (LinkedBlockingQueue.java:435)
at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1035)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1097)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:587)
at java.lang.Thread.run (Thread.java:841)

"Measurement Worker" prio=5 tid=12 TIMED_WAIT
at java.lang.Object.wait (Native Method)
at java.lang.Object.wait (Object.java:401)
at iy.run (com.google.android.gms.dynamite_measurementdynamite@[email protected] (000302-0):7)

"Thread-2659" prio=9 tid=13 WAIT
at java.lang.Object.wait (Native Method)
at java.lang.Thread.parkFor (Thread.java:1205)
at sun.misc.Unsafe.park (Unsafe.java:325)
at java.util.concurrent.locks.LockSupport.park (LockSupport.java:157)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2017)
at java.util.concurrent.PriorityBlockingQueue.take (PriorityBlockingQueue.java:510)
at bo.b (com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:1)
at bo.run (com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:3)

"Thread-2660" prio=9 tid=14 WAIT
at java.lang.Object.wait (Native Method)
at java.lang.Thread.parkFor (Thread.java:1205)
at sun.misc.Unsafe.park (Unsafe.java:325)
at java.util.concurrent.locks.LockSupport.park (LockSupport.java:157)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2017)
at java.util.concurrent.PriorityBlockingQueue.take (PriorityBlockingQueue.java:510)
at bw.a (com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:1)
at bw.run (com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:2)

"Thread-2661" prio=9 tid=15 WAIT
at java.lang.Object.wait (Native Method)
at java.lang.Thread.parkFor (Thread.java:1205)
at sun.misc.Unsafe.park (Unsafe.java:325)
at java.util.concurrent.locks.LockSupport.park (LockSupport.java:157)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2017)
at java.util.concurrent.PriorityBlockingQueue.take (PriorityBlockingQueue.java:510)
at bw.a (com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:1)
at bw.run (com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:2)

"CleanupReference" daemon prio=5 tid=20 WAIT
at java.lang.Object.wait (Native Method)
at java.lang.Object.wait (Object.java:401)
at java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:102)
at java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:73)
at com.android.org.chromium.content.common.CleanupReference$1.run (CleanupReference.java:49)
"Thread-2605" prio=5 tid=21 NATIVE
#00 pc 0000000000021918 /system/lib/libc.so (__futex_syscall3+12)
#00 pc 000000000000ef64 /system/lib/libc.so (__pthread_cond_timedwait_relative+48)
#00 pc 000000000000efc4 /system/lib/libc.so (__pthread_cond_timedwait+64)
#00 pc 00000000001c9323 /system/lib/libwebviewchromium.so
#00 pc 00000000001bbf27 /system/lib/libwebviewchromium.so
#00 pc 00000000001b236f /system/lib/libwebviewchromium.so
#00 pc 00000000001b1931 /system/lib/libwebviewchromium.so
#00 pc 00000000001b6663 /system/lib/libwebviewchromium.so
#00 pc 00000000001b0feb /system/lib/libwebviewchromium.so
#00 pc 00000000001bec53 /system/lib/libwebviewchromium.so
#00 pc 00000000001bc903 /system/lib/libwebviewchromium.so
#00 pc 000000000000d208 /system/lib/libc.so (__thread_entry+72)
#00 pc 000000000000d3a4 /system/lib/libc.so (pthread_create+240)
at dalvik.system.NativeStart.run (Native Method)
And many more...


Another error detailed below:

Input dispatching timed out (Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago. Wait queue length: 3. Wait queue head age: 10507.9ms.)

"main" prio=5 tid=1 Native
#00 pc 00000000000175b8 /system/lib/libc.so (syscall+28)
#00 pc 00000000000b643d /system/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+92)
#00 pc 00000000003f045b /system/lib/libart.so (art::GoToRunnable(art::Thread*)+230)
#00 pc 00000000003f034b /system/lib/libart.so (art::JniMethodEnd(unsigned int, art::Thread*)+8)
#00 pc 00000000006258ad /system/framework/arm/boot-framework.oat (Java_android_os_BinderProxy_transactNative__ILandroid_os_Parcel_2Landroid_os_Parcel_2I+152)
at android.os.BinderProxy.transactNative (Native method)
at android.os.BinderProxy.transact (Binder.java:615)
at com.android.vending.billing.IInAppBillingService$Stub$Proxy.isBillingSupported (IInAppBillingService.java:349)
at com.android.billingclient.api.BillingClientImpl$BillingServiceConnection.onServiceConnected (BillingClientImpl.java:996)
at android.app.LoadedApk$ServiceDispatcher.doConnected (LoadedApk.java:1535)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run (LoadedApk.java:1563)
at android.os.Handler.handleCallback (Handler.java:751)
at android.os.Handler.dispatchMessage (Handler.java:95)
at android.os.Looper.loop (Looper.java:154)
at android.app.ActivityThread.main (ActivityThread.java:6312)
at java.lang.reflect.Method.invoke! (Native method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:872)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:762)

"Jit thread pool worker thread 0" prio=5 tid=2 Native (still starting up)
#00 pc 00000000000175b8 /system/lib/libc.so (syscall+28)
#00 pc 00000000000b643d /system/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+92)
#00 pc 00000000003411e9 /system/lib/libart.so (art::ThreadPool::GetTask(art::Thread*)+160)
#00 pc 0000000000340a13 /system/lib/libart.so (art::ThreadPoolWorker::Run()+62)
#00 pc 0000000000340541 /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+64)
#00 pc 0000000000047273 /system/lib/libc.so (__pthread_start(void*)+22)
#00 pc 0000000000019bd1 /system/lib/libc.so (__start_thread+6)


"ReferenceQueueDaemon" daemon prio=5 tid=4 Waiting
at java.lang.Object.wait! (Native method)
at java.lang.Daemons$ReferenceQueueDaemon.run (Daemons.java:150)
at java.lang.Thread.run (Thread.java:761)

"FinalizerDaemon" daemon prio=5 tid=5 Waiting
at java.lang.Object.wait! (Native method)
at java.lang.Object.wait (Object.java:407)
at java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:188)
at java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:209)
at java.lang.Daemons$FinalizerDaemon.run (Daemons.java:204)
at java.lang.Thread.run (Thread.java:761)

"FinalizerWatchdogDaemon" daemon prio=5 tid=6 Waiting
at java.lang.Object.wait! (Native method)
at java.lang.Daemons$FinalizerWatchdogDaemon.sleepUntilNeeded (Daemons.java:269)
at java.lang.Daemons$FinalizerWatchdogDaemon.run (Daemons.java:249)
at java.lang.Thread.run (Thread.java:761)

"Binder:4011_1" prio=5 tid=8 Native

#00 pc 0000000000048828 /system/lib/libc.so (__ioctl+8)
#00 pc 000000000001abd3 /system/lib/libc.so (ioctl+38)
#00 pc 000000000003cc55 /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+168)
#00 pc 000000000003cd4d /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+8)
#00 pc 000000000003d2bb /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+46)
#00 pc 000000000004f5d5 /system/lib/libbinder.so (???)
#00 pc 000000000000e43d /system/lib/libutils.so (android:🧵:_threadLoop(void*)+140)
#00 pc 00000000000689ad /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+80)
#00 pc 0000000000047273 /system/lib/libc.so (__pthread_start(void*)+22)
#00 pc 0000000000019bd1 /system/lib/libc.so (__start_thread+6)

"Binder:4011_2" prio=5 tid=9 Native
#00 pc 0000000000048828 /system/lib/libc.so (__ioctl+8)
#00 pc 000000000001abd3 /system/lib/libc.so (ioctl+38)
#00 pc 000000000003cc55 /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+168)
#00 pc 000000000003cd4d /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+8)
#00 pc 000000000003d2bb /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+46)
#00 pc 000000000004f5d5 /system/lib/libbinder.so (???)
#00 pc 000000000000e43d /system/lib/libutils.so (android:🧵:_threadLoop(void*)+140)
#00 pc 00000000000689ad /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+80)
#00 pc 0000000000047273 /system/lib/libc.so (__pthread_start(void*)+22)
#00 pc 0000000000019bd1 /system/lib/libc.so (__start_thread+6)

"GLThread 244" prio=5 tid=10 Native
#00 pc 00000000000175b8 /system/lib/libc.so (syscall+28)
#00 pc 00000000000b643d /system/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+92)
#00 pc 00000000003f045b /system/lib/libart.so (art::GoToRunnable(art::Thread*)+230)
#00 pc 00000000003f034b /system/lib/libart.so (art::JniMethodEnd(unsigned int, art::Thread*)+8)
#00 pc 0000000000085a73 /system/framework/arm/boot.oat (Java_java_lang_System_nanoTime__+86)
at java.lang.System.nanoTime (Native method)
at com.TanApps.FindTheDifferences500_2.DemoRenderer.WaitForVsync (DemoRenderer.java:375)
at com.yoyogames.runner.RunnerJNILib.WaitForVsync (RunnerJNILib.java:236)
at com.yoyogames.runner.RunnerJNILib.Process (Native method)
at com.TanApps.FindTheDifferences500_2.DemoRenderer.onDrawFrame (DemoRenderer.java:560)
at android.opengl.GLSurfaceView$GLThread.guardedRun (GLSurfaceView.java:1553)
at android.opengl.GLSurfaceView$GLThread.run (GLSurfaceView.java:1253)


"RenderThread" prio=5 tid=11 Native
#00 pc 00000000000486e8 /system/lib/libc.so (__epoll_pwait+20)
#00 pc 0000000000019f81 /system/lib/libc.so (epoll_pwait+60)
#00 pc 0000000000019fb1 /system/lib/libc.so (epoll_wait+12)
#00 pc 0000000000011dd7 /system/lib/libutils.so (android::Looper::pollInner(int)+118)
#00 pc 0000000000011cd3 /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+26)
#00 pc 0000000000028e1d /system/lib/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+284)
#00 pc 000000000000e43d /system/lib/libutils.so (android:🧵:_threadLoop(void*)+140)
#00 pc 00000000000689ad /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+80)
#00 pc 0000000000047273 /system/lib/libc.so (__pthread_start(void*)+22)
#00 pc 0000000000019bd1 /system/lib/libc.so (__start_thread+6)
And many more...




Can anyone help me?

Regards,
Mataca
 

Fiersking

Member
hi! same here anyone know sometyhing ?
I have this kind of anr : Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago. Wait queue length
 

SnoutUp

Member
hi! same here anyone know sometyhing ?
I have this kind of anr : Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago. Wait queue length
Did any of you resolve any ANRS? :)
 

Mool

Member
They current way to solve ANR´s and Crashes is the following:

First you choose an ANR error, then you click "expand all" and search for (CTRL+F) "yoyo" or any other SDK´s you use, like "IronSource", "Facebook"... depends on your game.
Then you have 2 options. 1. You dont find anything, which is bad, because its even harder to fix then (I normaly ignore these logs and try another, by clicking > at the top near "expand all2)
or 2. you get something like this:

1638195999300.png

Here another example of an ANR, which I did fix based on the info i got there then:

1638196116137.png

IMPORTANT: LOOK INTO MULTIPLE LOGS, BECAUSE THEY ARE OFTEN DIFFERENT!!! I HAD TO LEARN THAT THE HARD WAY!!!

1638196318201.png

IMPORTANT: IT ONLY WORKS FOR YYC!!!

IF YYG WOULD LET US USE a symbollist, then we also could use Crashlytics! I hope it will be released soon.
 
They current way to solve ANR´s and Crashes is the following:

First you choose an ANR error, then you click "expand all" and search for (CTRL+F) "yoyo" or any other SDK´s you use, like "IronSource", "Facebook"... depends on your game.
Then you have 2 options. 1. You dont find anything, which is bad, because its even harder to fix then (I normaly ignore these logs and try another, by clicking > at the top near "expand all2)
or 2. you get something like this:

View attachment 44543

Here another example of an ANR, which I did fix based on the info i got there then:

View attachment 44544

IMPORTANT: LOOK INTO MULTIPLE LOGS, BECAUSE THEY ARE OFTEN DIFFERENT!!! I HAD TO LEARN THAT THE HARD WAY!!!

View attachment 44545

IMPORTANT: IT ONLY WORKS FOR YYC!!!

IF YYG WOULD LET US USE a symbollist, then we also could use Crashlytics! I hope it will be released soon.
As someone who doesn't work in mobile and doesn't have any interest in it, this is the most informative mobile bug tracking post I've seen in a long time in regards to the format. I'd be interested in seeing exactly how you squashed those bugs and, just saying, it'd be some really good material for a tutorial if you have the time and inclination to post one.
 

Mool

Member
The thing is. Android Vitals are proportional with Android downloads, with that in mind you have no other chance, than finding these bugs. I lost like 50% of my downloads because I had some crashes and ANR´s above threshold I could not figure out.

This for example is a joint bug. If you have to many joints, that dont break. (the physics simulation starts to do weird things and Box2D sometimes freeze).
Others are more simple, there you can see which script does bug.
I also log all my GMS crashes to a database (but that works only for all none silent crashes)
 

Mool

Member
Google it; SDK Support; Discord Servers; Asking here; general knowledge; ...

the last ANR I fixed by using a thread in java, so the main thread isnt blocked
 

chirpy

Member
the last ANR I fixed by using a thread in java, so the main thread isnt blocked
This. ANR stands for app-not-responding, and bugs I did manage to reproduce and fix were all about threads waiting for one another, which you may or may not be able to reproduce while switching between UI activities.

Things that may help include:
Updating ad SDKS, making sure extensions' android UI activities don't block the main thread (queue Runnables properly to the UI thread), pausing the game properly when ads are displaying.

Just my 2 cents.

=====
I recently switched to gradle 7 and was able to build successfully with "android.buildTypes.release.ndk.debugSymbolLevel = 'full'" added to my ProjectFiles/build.gradle , removing a warning about symbols from Google Play Console.

I haven't published the game so I don't know how much it'll help though.
 
Top