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 Build a Playlist Browser with Swift Building the Music Library and Playlist Models Using a Playlist Instance

Thread 1: signal SIGABRT error?

When I try to run my app, I get an error message, highlighting a strand of code in green. I've double checked all of my code so far and can't find the error. Any ideas?

The line highlighted in green is:

class AppDelegate: UIResponder, UIApplicationDelegate (in the AppDelegate.swift)

It also produces output (at the bottom of XCode) that says:

2015-07-23 10:09:30.913 Algorhythm[2466:661850] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Algorhythm.PlaylistMasterViewController 0x7fbc185b2960> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key playlistimageView0.' *** First throw call stack: (

2 Answers

Andreas Schürch
Andreas Schürch
2,087 Points

Had the same SIGABRT-Error. For me helped to

  1. delete the @IBOutlet in PlaylistMasterViewController.swift
  2. remove the Referencing Outlet (right-click on Image-View)
  3. and connect again the Image-View with ctrl + move with PlaylistMasterViewController.swift.
Caleb Kleveter
MOD
Caleb Kleveter
Treehouse Moderator 37,862 Points

Look at the left side of your code in the gutter, there is probably a fat, blue arrow on the line you get the error. Right click on it and select 'Delete Breakpoint'. Hope this helps!

Still not working. Here is the output error message:

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Algorhythm.PlaylistMasterViewController 0x7fb0abc17f90> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key playlistimageView0.'

And here is my PlaylistMasterViewController

import UIKit

class PlaylistMasterViewController: UIViewController {

    @IBOutlet weak var aButton: UIButton!

    @IBOutlet weak var playlistimageview0: UIImageView!

    override func viewDidLoad() {
        super.viewDidLoad()    

        aButton.setTitle("Press me!", forState: .Normal)

        let playlist = Playlist(index: 0)
        playlistimageview0.image = playlist.icon 
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?){
        if segue.identifier == "showPlaylistDetail"{
           let playlistDetailController = segue.destinationViewController as!
            PlaylistDetailViewController
            playlistDetailController.segueLabelText = "Yay! You pressed the button!"
        }

    }
}