'thread 1 signal sigabrt'

My program gives me the "thread 1 sigabrt" error. This is the code that appears in red :

class AppDelegate: UIResponder, UIApplicationDelegate {

with "thread 1 signal sigabrt" written next to it.

I have searched and it makes no sense to me,
Thanks in advance.

That's alright, I just created a new file attaching to NSObject instead of UIView Controller.

A couple of things:

  • You should ask a question like this over at forums.developer.apple.com, since it's not really about the Swift language, but about how to debug an error in an iOS app.

  • The "thread 1 sigabrt" message just tells you that your app crashed (deliberately, I suspect). It's reported against that line because it has the annotation @UIApplicationMain on the line before, and that represents your app's initial entry point, and (ultimately) its final exit point — which is where the crash was finally handled.

  • So what's really wrong? Well, you need to learn how to find the console log pane. When Xcode stops and shows you this error in red, it also displays the debugging area at the bottom of the window. This area actually has two possible panes, but only the left one is displayed by default. To display the right pane too, click the little icon in the extreme bottom right of the window. This right pane is the log, and there should be a more meaningful error there.

1 Like