How to fix "process is bad" error for an Android Widget?

Viewed 25462

I have developed an Android Widget, and it was working fine. I added some extra functionality and pushed an update through the Android Market. Now people are complaining that it doesn't work anymore.

The error I see in the logs is:

07-14 10:33:44.016: WARN/ActivityManager(78): Unable to launch app ... 
for broadcast Intent { act=android.appwidget.action.APPWIDGET_ENABLED 
cmp=... }: process is bad 
07-14 10:33:44.026: WARN/ActivityManager(78): finishReceiver called 
but none active 
07-14 10:33:44.026: WARN/ActivityManager(78): Unable to launch app ... 
for broadcast Intent { act=android.appwidget.action.APPWIDGET_UPDATE 
cmp=... (has extras) }: process is bad 
07-14 10:33:44.036: WARN/ActivityManager(78): finishReceiver called 
but none active 

I have searched, but I cannot find anywhere what the process is bad error means, so I have no clue on how to fix it. Restarting the phone (or emulator) makes the error go away, however, that is not what I want my users to do. Could someone please help me to explain what the cause of the error is and how to fix it?

14 Answers

The "process is bad" is due to multiple crashes of the app (or BroadcastReceiver, Service, or other component). After a few of these the system decides it's fed up with that behavior and prevents the process from starting again.

A reboot will clear the crash count but it can also be cleared by killing the system server:

adb shell killall system_server

This will effectively do a "soft reboot." I find it much quicker than an actual reboot.

I faced a similar problem . When I went through my code , I realized that it was the default values which were the culprit . Ensure that your default values are logical and positive.For instance ,if you have a background service starting at a particular interval , ensure that the default value you have set for the same is appropriate.

Related