Getting Exception SIGKILL when relaunching app
Asked Answered
D

2

17

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?

Dermal answered 15/7, 2011 at 5:49 Comment(4)
It just says Received SIGKILLDermal
There are many possibility for SIGKILL error. Provide your console information.Athamas
try setting nszombieenabled in executables...if it is some memory management issueMedeah
What are you doing on launch? Are you reading some file?Boil
N
23

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.

Naos answered 15/7, 2011 at 6:36 Comment(2)
But, there's just a little nuance. It does not happen with all apps.It happens just with 2 of themDermal
Arguably it's a bug in XCode that it happens at all – the debugger really shouldn't present a SIGKILL from the operating system as something to be debugged – but I suspect it may be a while before this rises to the top of Apple's "things to fix in XCode" list. If you were to file a bug report with Apple, though, it might help them if you included that two of your apps consistently tickle the bug (and your other apps don't).Naos
D
1

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.

Dupaix answered 15/7, 2011 at 6:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.