Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

General Discussion

heinz meza
heinz meza
4,788 Points

Signal SIGABRT?

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 !

http://imgur.com/EOhkZPT

http://imgur.com/O3nqg1O

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