当前位置: 动力学知识库 > 问答 > 编程问答 >

ios - How to debug when there is a red line with error "Thread 1: signal SIGTERM"

问题描述:

I am using XCode 7.2.

My project app is running on simulator, it simply launch a ViewController with yellow background. Though the simulator did launch the yellow background, but xcode highlight the AppDelegate with red color like my image shows:

I have no idea, what does it mean? How to debug? There isn't much information for me.

网友答案:

SIGTERM is the termination signal. You get it if you app is killed. A common reason is if the simulator is quit or reset (for example, to change its hardware). It's also the signal that you receive if you press Home on an app that doesn't support backgrounding (this is extremely rare today).

If this is happening on a very simple app without any interaction with the Simulator (pressing Home, changing its config), I would reboot. I have seen this kind of behavior immediately after upgrading Xcode until the next reboot. Xcode has gotten much, much better about that in recent years, but it's still the first thing I would try. SIGTERM is very rarely generated inside your program.

网友答案:

Try setting an exception breakpoint and see if that hits in a more useful place.

See this article for how to set the breakpoint.

分享给朋友:
您可能感兴趣的文章:
随机阅读: