Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Bryce Rega
318 PointsThread 1: signal SIGABRT
I know there are a hundred different topics on this, (not to mention another hundred results on Google) but all of the topics' initial questions either don't have the same circumstances (error pops up in different place, uses something else besides SpriteKit Game, etc...) or the solution is something I tried but was already fixed (like setting things in the project settings that were already set the right way).
Here is the error with the code and info.... • Xcode - Swift • SpriteKit • The error appears in AppDelegate.swift • Line 12
1: //
2: // AppDelegate.swift
3: // Muffin Defense
4: //
5: // Created by on 6/16/16.
6: // Copyright © 2016 Binc. All rights reserved.
7: //
8:
9: import UIKit
10:
11: @UIApplicationMain
12: class AppDelegate: UIResponder, UIApplicationDelegate { <-- Thread 1: signal SIGABRT
13 - 47: [More code is here... just didn't need to paste more than I did]
I know that SIGABRT is really SIG ABRT short for Signal Abort. Abort meaning, quit the app/crash it. All my file names seem to be right, and cleaning the code doesn't help that much.
Whats weird: What is weird it that this happen in about the same spot every time. My app (as I said before) is a SpriteKit Game in Swift on Xcode. You shoot aliens in Muffin and Cupcake ships with lasers. When one hits you, you die. Then a page opens with. The page tells you your score, your high score, etc... AND a Restart Button. If that screen is up for longer then half a second (I get 60fps) the app will crash and the error will pop up in Xcode. If you press restart before that half second is up, then you get to play again. Someone please help me. I plan on releasing this app in December and need to finish most coding by the end of September.
1 Answer

Martin Wildfeuer
Courses Plus Student 11,071 PointsThis is actually where you will end up with every crash, it does not really tell you anything about how, where and when your app crashed.
What is really helpful is the console output as well as the stack trace, both accessible in Xcode.
First of all you might want to set an exception breakpoint, in case of Swift a Swift Error Breakpoint.
This breakpoint should shed some light on what the reason for the exception is, as it highlights the line with the code causing the crash.
Hope this helps :)
Bryce Rega
318 PointsBryce Rega
318 PointsI don't really know what an exception breakpoint is. When I looked it up, it appeared to be used in C++ and Objective-C, not Swift. I DO know what a breakpoint is. I'm not sure if there's a difference between an exception breakpoint and a breakpoint. So when I added a breakpoint on line 12, the stack trace highlighted "0 main" instead of "12 main" and line 12 was highlighted in green and instead said "Thread 1: breakpoint 1.3" so I don't have a clue what is happening. I hope you understand it, though.
Martin Wildfeuer
Courses Plus Student 11,071 PointsMartin Wildfeuer
Courses Plus Student 11,071 PointsAs mentioned in my answer, in case of Swift you will need a Swift Error Breakpoint:
First of all you might want to set an exception breakpoint, in case of Swift a Swift Error Breakpoint.
It is not the same as a regular breakpoint, the link above will redirect you to the Apple Docs, with an explanation of how to setup this special breakpoint.
Bryce Rega
318 PointsBryce Rega
318 PointsYes! Thank you so much. I really appreciate it. Thread 1: signal SIGABRT no longer exists. Now I can get back to making my app and testing it, without the worry of SIGABRT. Glad you could help.
Martin Wildfeuer
Courses Plus Student 11,071 PointsMartin Wildfeuer
Courses Plus Student 11,071 PointsSure thing :)
Bryce Rega
318 PointsBryce Rega
318 PointsIt still is crashing every now and then, but I think it's just the simulator because Xcode isn't showing anything. I did get SIGABRT only once after I tried the Swift Error Breakpoint, but it hasn't popped up since. Once again, thank you!
Martin Wildfeuer
Courses Plus Student 11,071 PointsMartin Wildfeuer
Courses Plus Student 11,071 PointsJust to be sure: this does not prevent an error, nothing has changed in your app. This is a thing that happens exclusively in Xcode. It is just for debugging purposes, it will highlight the faulty code and the condition. This does not fix anything for you but helps you to find the issue that your app apparently has.