this causes a black screen and eventually an OS message saying "org.mozilla.fennec" has stopped responding.
Duplicate of this bug: 607388
Created attachment 486120 [details] [diff] [review] patch It looks like the broadcast receiver is keeping our process alive. This wasn't happening yesterday when I landed the follow up to bug 606178, not sure what changed. This patch makes the Restarter an activity so we can use the FLAG_ACTIVITY_NEW_TASK safely on eclair and make sure it gets launched into a different process. It also puts a count down into the loop so we won't spin infinitely if something goes wrong. We might want to add some fallback code that tries to kill the hung process if we hit this in the future.
Attachment #486120 - Flags: review?(mwu)
Comment on attachment 486120 [details] [diff] [review] patch Can we just go back to System.exit() like we were doing before?
There's a bit of nuance here, but no, not unless we go back to the Runtime.exed("am start ....") approach. That basically spawned a new process for use right away, we exited our original process then the broadcast receiver stared yet another process. With the sendBroadcast, as far as I can tell, System.exit(0) will either kill the process before the broadcast is received or kill the process that the broadcast receiver is running in, depending on how the race goes.
Comment on attachment 486120 [details] [diff] [review] patch I think using a separate activity to achieve the restart is more correct anyway.
Attachment #486120 - Flags: review?(mwu) → review+
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.