So I have gotten ANRs a lot since about a month ago. When it should've been any kind of uncaught exception, my app goes ANR. I tried making my app crash by doing things which will easily cause NPE (using a method in an adapter which hasn't been instantiated and stuffs like this) and it just goes ANR.
I am at loss on where the problem is. When I googled, it only shows that ANR is caused by GoogleAnalytics? I haven't worked with that..
EDIT : This is not a simple ANR. It'd be tracable easier if it were like that, as I wrote, when I try making it NPE, it goes ANR, what else do I need to say in order to explain the situation? Was I not clear enough? If yes, please tell me what else do I need to tell because I gotta update the app soon lol
UPDATE 11/29/'16 10:32 AM :
I used ANRWatchDog to check what's happening with my app, and I got this
FATAL EXCEPTION: |ANR-WatchDog|
Process: com.km.test, PID: 31207
com.github.anrwatchdog.ANRError: Application Not Responding
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: main (state = NEW)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: AsyncTask #1 (state = WAITING)
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.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410)
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)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: AsyncTask #2 (state = WAITING)
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.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410)
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)
There are 3 more AsyncTask waiting below those 2..
It happened all of a sudden around 2 weeks ago and I haven't found the root problem yet..