Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting Exception SIGKILL when relaunching app

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?

like image 322
Mikayil Abdullayev Avatar asked Jul 15 '11 05:07

Mikayil Abdullayev


2 Answers

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.

like image 70
Scott Forbes Avatar answered Oct 04 '22 23:10

Scott Forbes


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.

like image 28
cduhn Avatar answered Oct 04 '22 23:10

cduhn