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

General Discussion

heinz meza
heinz meza
4,788 Points


When i run the app and click on the button"Pressed me" the app crashes and I get the signal SIGABRT? any help please.

3 Answers

There can be a lot of causes for a SIGABRT, and the kicker is that they could be absolutely anywhere in your code. You'll need to manually debug your code, by placing breakpoints before the troublesome code and checking the variables at that point. Here's a quick guide:

  1. Place Breakpoints

    Place breakpoints strategically before the code you expect to malfunction. Place breakpoints by clicking on the line numbers to the left of your code.

  2. Run your app

  3. When execution pauses, look through the variables displayed at the bottom in the debug bar, to see if anything's amiss. This could be an uninstantiated variable, optional unwrapping, or a bunch of other things.

  4. Fix that issue!

If all else fails, you can upload your project to GitHub and I'll have a look at it for you.

Good luck!

heinz meza
heinz meza
4,788 Points

I still get the error

There is never a magic bullet for SIGABRT errors. You have to manually debug it. If you want, I'll help you if you upload your project to something like GitHub.

heinz meza
heinz meza
4,788 Points

I don't know yet how to upload to github, but please see a link here to the image I get when I click the playlist. Not sure how to solve it !



Okay, I can't make a good judgment from the limited info, but to me this looks like an issue with your IBOutlets or IBActions. Why not give those a check over, and if you're still stumped I recommend downloading Pasan's project files, opening both of the ViewController.swift files, and pasting them into a diff tool to see where the files are different. (This one works nicely). Just be sure to download the right version for where you are in the course.

P.S. I really recommend you learn how to use Git, it's great for keeping your projects on track and organized. Treehouse has a great course called Git Basics which you might want to check out. :)