I build and run a project in iPhone simulator. I send it to background by pressing the home button. Then I double press the home button to find my app in the background and tap it. It becomes active and the app continues to run. Here I got no problem no matter how many times I repeat this. Then I kill the process by tapping the little red minus sign on the app's icon. But if I again tap the app icon to relaunch it I get SIGKILL error and app crashes. What could be the reason for this? Could it be caused by my XCode preferences?
This isn't really a crash: It's just XCode having a delayed reaction to your tapping the little red minus sign. When you terminate your app this way, the operating system sends a SIGKILL signal to your process – but XCode's debugger doesn't "see" the SIGKILL until after you relaunch the app.
You can "recover" from this "crash" by hitting the Continue button in the debugger, incidentally.
I've seen similar crashes in the simulator when I didn't let the debugger detach itself gracefully from the app. Rather than killing the app by tapping the little red minus sign, try hitting the "stop" button in Xcode.
To further confirm that this is related to the debugger, try running the app the first time by tapping on the icon rather than using Build and Run in Xcode. Then kill it by tapping on the red X and relaunch it. If it still crashes without the debugger attached, then my hypothesis is invalid.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With