出现红线错误“Thread 1: signal SIGTERM"时如何调试; [英] How to debug when there is a red line with error "Thread 1: signal SIGTERM"

查看:35
本文介绍了出现红线错误“Thread 1: signal SIGTERM"时如何调试;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 XCode 7.2.

I am using XCode 7.2.

我的项目应用程序在模拟器上运行,它只是启动一个黄色背景的 ViewController.虽然模拟器确实启动了黄色背景,但是 xcode 用红色突出显示了 AppDelegate,就像我的图片所示:

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 是终止信号.如果您的应用程序被杀死,您就会得到它.一个常见的原因是模拟器退出或重置(例如,更改其硬件).这也是您在不支持后台的应用上按 Home 时收到的信号(如今这种情况极为罕见).

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).

如果这发生在一个非常简单的应用程序上,而没有与模拟器进行任何交互(按 Home,更改其配置),我会重新启动.我在升级 Xcode 后立即看到这种行为,直到下次重新启动.近年来,Xcode 在这方面变得越来越好,但它仍然是我会尝试的第一件事.SIGTERM 很少在您的程序中生成.

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.

这篇关于出现红线错误“Thread 1: signal SIGTERM"时如何调试;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆