Application stops in main after terminating and restarting


#1

Is this normal behavior? I get paused in main whenever I terminate the Homepwner app and then start it again.

At first I thought it was breaking because of an error, however all the data loaded fine.

Quickly I ran the solution file just to see and I got the same behavior. Therefore I’m guessing this is normal for the simulator?


#2

Having the same problem - on recovery from terminate, it loads all the Possessions and the ItemsViewController and then promptly crashes. Of course, logging and debugging has stopped… one is left with the threads which are seriously over my head.


#3

later… had a look at the previous edition boards (should have done this first!) and this does seem to be an Xcode 4 bug. Stopping the simulator in Xcode (the square button next to run) and then restarting in the simulator works fine.
Likewise, if my iPhone is not plugged in but is running the app independently it is quite stable.
Thank goodness!


#4

This is due to the debugger staying attached to the process after the operating system has killed it.

In the book, I say you should kill the application from the task bar. This used to be okay because Xcode would say, “Oh yeah, that app is killed, I’ll stop running it.”

Now, Xcode just breaks on the kill and halts in the debugger, keeping the application.

The solution is to use the Stop button in Xcode to kill an application.


#5

This happened to me also in Xcode 4.2 however I noticed that if you simply hit the “continue” arrow from the debugger it just runs fine.


#6

If you stop the debugger and then follow the instructions in the book the simulator all works fine. This got me worried initially a I though t i had a problem.

Niall