I have no idea how to work out where this null pointer exception is occurring.
The crash has only happened once (so far) on a user's physical device as advised by Google Play - I haven't been able to reproduce it in a debug environment.
The Stack Trace that Google Play gives me seems a bit vague (despite me having loaded a mapping file for the release):
java.lang.NullPointerException:
at com.nooriginalthought.amalfi.getShortURL.a (getShortURL.java:11)
at com.nooriginalthought.amalfi.getShortURL.onPostExecute (getShortURL.java:2)
at android.os.AsyncTask.finish (AsyncTask.java:695)
at android.os.AsyncTask.access$600 (AsyncTask.java:180)
at android.os.AsyncTask$InternalHandler.handleMessage (AsyncTask.java:712)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:193)
at android.app.ActivityThread.main (ActivityThread.java:6806)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:873)
All I can see is that the exception appears to be being thrown by the onPostExecute
function in my getShortURL
class (this is an async task that calls the bitly API).
The code works fine and only a single crash has been reported.
The code in onPostExecute
is very simple (incl source code line numbers):
1320 @Override
1321 protected void onPostExecute(String shortURL) {
1322 super.onPostExecute(shortURL);
1323 mainActivityWeakReference.get().shortURLreturn(shortURL);
1324 }
(shortURLreturn
is defined within my MainActivity class)
How can I work out what actually threw this error?