Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android : ANR in Google Analytics

Getting ANR in the application while using GA.

Using

compile 'com.google.android.gms:play-services-analytics:7.5.0'

Trace below :

"main" prio=5 tid=1 WAIT
| group="main" sCount=1 dsCount=0 obj=0x41d0ed08 self=0x419530e8
| sysTid=15869 nice=-11 sched=0/0 cgrp=apps handle=1074995540
| state=S schedstat=( 321620545 42516968278 6171 ) utm=18 stm=13 core=0

at java.lang.Object.wait(Native Method)
- waiting on <0x41d0edd8> (a java.lang.VMThread) held by tid=1 (main)

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.FutureTask.awaitDone(FutureTask.java:400)
at java.util.concurrent.FutureTask.get(FutureTask.java:162)
at com.google.android.gms.analytics.internal.zzb.zzhI((null):-1)
at com.google.android.gms.analytics.GoogleAnalytics.zzhk((null):-1)
at com.google.android.gms.analytics.ExceptionReporter.uncaughtException((null):-1)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
at dalvik.system.NativeStart.main(Native Method)

Please suggest if you have faced similar issue in past

like image 435
Rohit Kumar Avatar asked Nov 01 '22 02:11

Rohit Kumar


1 Answers

I wasted a day on searching the solution (I have the same thread dump) and released that it's not directly related to Google Analytics. The root cause was the next line: adView.destroy(); where adView == null. Seems Google Analytics tried to send this exception and crashed itself. I found it by disabling Google Analytics at all.

like image 54
Anton Balashov Avatar answered Nov 09 '22 03:11

Anton Balashov