I have a live app that uses AsyncTask in several activities, and I’m getting an untraceable error (below). The key line of bto.org.monitoring.birdtrack.ce.doInBackground(Unknown Source) that is being sent to Google Play by my users (with no messages of course) isn’t letting me debug this problem, so I can’t find the right bit of code never mind post it here. Any ideas?
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:200)
at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
at java.lang.Thread.run(Thread.java:1019)
Caused by: java.lang.NullPointerException
at bto.org.monitoring.birdtrack.ce.doInBackground(Unknown Source)
at android.os.AsyncTask$2.call(AsyncTask.java:185)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
... 4 more
OK, sussed this now. I am using Proguard, and can detect the location of the doInBackground() method by grabbing the error and running it past the using:
This translates the error to display the classes that are causing it. Hooray!