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

iOS

What does "Thread 1: signal SIGABRT" mean?

I'm trying to create a weather app in the Build a Weather App in Swift course, and when I go to run the app in the simulator I get the "Thread 1: signal SIGABRT" error.

The line of code associated with this error is:

class AppDelegate: UIResponder, UIApplicationDelegate {

What can I do about this?

Maximiliano Villa
Maximiliano Villa
2,250 Points

Oh, I figured it out. Check that all your connections are correct.

I was having an issue with the "refreshActivityIndicator" as I had named it something different, then changed the name in the viewcontroller file but didn't change the connection (it doesn't update automatically).

You can check that by selecting the object in your storyboard, and clicking on the last button to the right on the right sidebar. That shows its connections.

If you have one with a name that's different than what you put in code, just delete it. Then drag the outlined circle on the right, to the view controller icon on the top of your view. It should offer you the right connection, and done!

I just had this problem. For anyone looking this problem up like I did, I noticed I had a label linked to two different referencing outlets. It happened when I switched my variable name. I just deleted the old one and it worked good as new.

6 Answers

It means the signal between the simulator and your code has been abrupted. Check all your code connections with you UI elements.

What specific abruptions am I looking for? What are the most common mistakes in this case? I'm really confused right now.

The most common error is when your uielements are not linked up correctly in the IB.

kian christensen
kian christensen
2,186 Points

So go into your ui editor or main.storyboard and click on the button that isn't working, in the right menu in the top right corner there should be a circle with an arrow in it click on that and go down to the action that you picked for your button (most likely touch up inside) and there should be 1 or 2 things connected to it and click on the little x to delete the one that isn't the name that you put in your code

I'm having the same issue. I am so frustrated! Is there sample code posted for this project somewhere we can cross-check our code to?

I downloaded the project files, checked every line of code and couldn't find anything. Then I copied/pasted all the code from the project files into my project and it still won't run without this error. It runs from the project files, but not in my project. I checked all the UI elements... I am out of ideas.

Jeanne Merle
Jeanne Merle
3,390 Points

Hi, Maybe it's due to some manditory functions when you use delegation with your main main Class (i.e. : class Detail: UIViewController, UITableViewDataSource, UITableViewDelegate, ADInterstitialAdDelegate { ... } )

If you use location functions, or tableView functions, you will need to add some functions, even if they are empty, and delegate the triggering to the main class. And some of these functions are mandatory, you cannot NOT provide them.

This solved the issue for me earlier! I had connected a table as datasource and then delegate. After that I tried to run the program and it gave the same error. As it turns out I had forgotten to add a function. Thank you for this answer. It made a world of difference in my situation.

Kevin Osorio
Kevin Osorio
15,767 Points

Best way to solve it. Is to delete you current code and recap on your steps and try it again:) little things can be missed by watching videos

My UI elements look to be connected fine and I still have the same issue. Here is a screenshot. http://cl.ly/image/361M0P1O2c2O