手动终止后再次重新启动时应用程序崩溃
我正在开发我的第一个 iPhone 应用程序,并且在相当长的一段时间内我都面临着这个奇怪的问题。
每当我手动终止我的应用程序然后再次尝试重新启动时,它会立即崩溃并出现错误:
Thread 1: Program received signal: "SIGKILL"
但是当我再次重新编译并启动我的应用程序时,它工作得很好。我不能让我的应用程序从编译和运行时启动的相同设置启动吗?
我是 iPhone 开发新手,我想我在这里遗漏了一些严重的东西。将感谢您对此的帮助。
提前致谢!
I am working on my first application for iPhone and I'm facing this weird problem for quite some time now.
Whenever i kill my application manually and then again try to restart, it crashes immediately with error:
Thread 1: Program received signal: "SIGKILL"
But when I again recompile and launch my application, it works just fine. Can't i just make my application to start from the same settings with which it launches when i compile and run.
I'm new to iPhone development and i think i'm missing something grave here. Will appreciate your help on this.
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,您正在从 Xcode 运行该应用程序。如果您从 Xcode 运行它并手动退出(不是从 Xcode)并尝试从 Xcode 运行它,您将收到此异常。 无需担心此异常。
这似乎是 Xcode 中的一个错误。当您手动退出应用程序时,不会向 Xcode 发送应用程序退出运行的信号/提示。因此,Xcode 认为应用程序仍在运行。当您尝试从Xcode重新启动它时,它会抛出异常。
我不知道这的技术原因。可能是当您手动终止应用程序后重新启动应用程序时,Xcode 认为应用程序仍在运行,并尝试在重新启动之前停止它,并在那里抛出异常。
So you are running the app from Xcode. If you run it from Xcode and quit it manually(not from Xcode) and try to run it from Xcode, you will receive this exception. No need to bother about this exception.
It seems to be a bug in Xcode. When you quit the application manually, no signal/intimation is sent to Xcode that the app quit running. So, Xcode thinks that app is still running. When you try to relaunch it from Xcode, it throws the exception.
I don't know the technical reason for this. May be when you relaunch the app after killing it manually, Xcode thinks that app is still running and tries to stop it before relaunching it, and throws the exception there.