I'm trying to track down the source of a bug, based on a crash report submitted by a user, and have come to the conclusion that I need some basic training on how to interpret a crash report.
As an example, the crash report is as follows:
java.lang.NumberFormatException: Invalid int: ""
at java.lang.Integer.invalidInt(Integer.java:138)
at java.lang.Integer.parseInt(Integer.java:358)
at java.lang.Integer.parseInt(Integer.java:334)
at java.lang.Integer.valueOf(Integer.java:525)
at com.cloud3squared.meteogram.MeteogramService.cacheFileName(MeteogramService.java)
cacheBaseName(MeteogramService.java)
getAppWidgetId(MeteogramService.java)
createAdhocWidgetUpdateIntent(MeteogramService.java)
setupBasicClickStuff(MeteogramService.java)
setAdhocAppWidgetAlarm(MeteogramService.java)
setNextClockWidgetUpdateAlarm(MeteogramService.java)
cancelAppWidgetAlarm(MeteogramService.java)
cancelAppWidgetAlarms(MeteogramService.java)
logAction$3aaf2084(MeteogramService.java)
logActionAgainstAllWidgets$62dc3a79(MeteogramService.java)
updateAppWidget(MeteogramService.java)
showButtons(MeteogramService.java)
hideButtons(MeteogramService.java)
fetchOk(MeteogramService.java)
getViewId(MeteogramService.java)
putBitmapIntoWidget(MeteogramService.java)
lngNow(MeteogramService.java)
showNotification(MeteogramService.java)
showMessageInWidget(MeteogramService.java)
sharpen(MeteogramService.java)
removeFromRequestsList(MeteogramService.java)
removeFromRequestsList$204347ff(MeteogramService.java)
MeteogramService.java)
displayStuffInWidget(MeteogramService.java)
access$000(MeteogramService.java)
access$100(MeteogramService.java)
access$300(MeteogramService.java)
at com.cloud3squared.meteogram.MeteogramService$GetServerWidgetAsyncTask.onPostExecute(MeteogramService.java)
at android.os.AsyncTask.finish(AsyncTask.java:651)
at android.os.AsyncTask.access$500(AsyncTask.java:180)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:5526)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Is this showing the order of calls leading up to the NumberFormatException
, and if so, in what order? Do I read the at
lines from bottom to top? What is access
nested inside MeteogramService
?... there is no access
method in that class. How do I determine inside which function the NumberFormatException
actually occurs? Logically I would say inside cacheFileName
but there is nothing in there that might lead to such an exception... the parsing of a String
to an int
happens before that... the parsed int is simply passed into cacheFileName
.
Any help gratefully received.
EDIT
Further code snippets to refer to in comments below:
static String cacheFileName(Context context, int appWidgetId, int pxWidth, int pxHeight) {
String fileName = cacheBaseName(appWidgetId) + "_" + pxWidth + "x" + pxHeight + ".png";
logAction(context, appWidgetId, "cacheFileName " + fileName, TAG);
return fileName;
}
static String cacheBaseName(int appWidgetId) {
return (appWidgetId == AppWidgetManager.INVALID_APPWIDGET_ID) ? "widget_" : "widget_" + appWidgetId;
}