I’ve been working on a widget for a while, and it usually works fine when I try to run it or update the code, even after a crash. However, every once in a while it seems to have a “major” crash and the widget becomes completely unresponsive afterwards. Even if I try to push new code to the phone it remains unresponsive after the update.
I’ve tried uninstalling the widget and reinstalling it, only to have the same thing occur. The only thing that seems to work is if I do a factory reset of the phone. After that, the widget works fine until I start changing the code and I run into another such crash. However, I’d like to not have to do a factory reset every few days.
Has this happened to anyone/does anyone know what might be the cause of this? Is there some data stored on the phone somewhere that prevents it from ever working again after the first crash?
Here’s what the error log looked like:
java.lang.RuntimeException: Unable to start receiver com.alienweed.test.HelloWidget: android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 0
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2058)
at android.app.ActivityThread.access$2400(ActivityThread.java:132)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1098)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
This should fix the crash.