Program received signal SIGKILL exception comes up when I quit in the multitasking bar (iPhone)

久未见 提交于 2019-11-29 16:57:25

问题


When I double tap the home button and quit out of my app from the multitasking bar and open the app again, Xcode reads: "Thread 1: program received signal: SIGKILL" and freezes my iPod. The app has 1500+ lines so I can't really put any code up, sorry. What could I be doing wrong?


回答1:


Your 1500+ lines of code is really innocent of this crash.

It happens when you run the app from Xcode, and terminate it from the iPod, without stopping the execution from Xcode. Closing the app from multitasking bar doesn't stop its execution in Xcode(but, I always expect it to do). So, when you open it again, the Xcode throws that SIGKILL exception. And, it doesn't do any harm to your app. No need to worry about it.

And, ofcourse, I don't know any technical explanation for this behavior. I am not that genious ;-)




回答2:


That's normal, your app is receiving a signal that it has to terminate.

Just make sure that when it does, you handle it properly in one of the UIApplication delegate methods, so that no information is lost, and such.



来源:https://stackoverflow.com/questions/6566799/program-received-signal-sigkill-exception-comes-up-when-i-quit-in-the-multitaski

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!