2

I'm a little concerned that if I encounter an exception in one of my activities in my application the force close dialog seems to bring me back to a previous activity in the application history/stack instead of killing the whole application. Is this normal? I'm concerned that my application may be running multiple versions of itself somehow.

By intentionalally "breaking" my code I've figured this much out:

These are my activities opened consecutively after each other A>B>C>D>E

Breaking activity A causes me to force close back to the phone home screen Ditto for activity B Breaking D seems to bring me back to activity B when it is force closed Breaking E seems to bring me back to activity C when it is force closed

What's going on? I've checked all my intents to make sure I'm not opening them twice

jason
  • 427
  • 5
  • 20
  • 2
    Yes, an unhandled exception will not terminate the process, but tends to kill off only the component that was responsible for the exception (e.g., an activity). No, your application is not running multiple versions of itself. In terms of your specific behavior (activities A-E), that does seem somewhat odd, as I would expect a more consistent progression. – CommonsWare Feb 04 '12 at 23:53
  • Thanks, I may have got that slightly wrong, it did seem to be killing more than just the current activity but I may have made a mistake with the specifics. It takes my phone ages to recover from a fatal exception so debugging like this was very tedious! – jason Feb 05 '12 at 00:13
  • "It takes my phone ages to recover from a fatal exception so debugging like this was very tedious!" -- huh? You click the "Force Close" dialog, and you're done. It should take under two seconds. What else is your phone doing that takes "ages to recover"? – CommonsWare Feb 05 '12 at 12:06
  • "What else is your phone doing" is a question I ask myself a lot! It takes about ten seconds for the force close dialog to come up and that seems to temporarily remove all the icons from my home screens! I think I need to do a factory reset and start again at some point! – jason Feb 06 '12 at 20:15

1 Answers1

1

Thats normal :-) You must kill base Activity to stop all app.