Swift Error:Signal Sigabrt How to Solve It

Swift error : signal SIGABRT how to solve it

To solve the problem, first clean the project and then rebuild.

To clean the project, go to MenuBar: Product -> Clean

Then to rebuild the project, just click the Run button as usual.

How to solve a Thread 1: signal SIGABRT error?

Looks like you don't have a prototype cell in your collection view. This article might help you work through the issue.

https://theswiftdev.com/2018/04/17/ultimate-uicollectionview-guide-with-ios-examples-written-in-swift/

Without looking at the code I'm guessing you should be able to go into the storyboard select the cell and add in the cell name using the inspector on the right.

How to solve the error SIGABRT even if the outlets look correct?

Thanks for taking the time to write such a thorough question. If you want, you can upload your images to some other site (e.g. imgur) and then use the direct links here.

As matt mentions in the comments, that as! might be the reason you're seeing this crash. You can easily prove it if you replace your code to something like this:

    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if let finalCompleteTest = segue.destination as? FinalCompleteTest {
finalCompleteTest.score = String(sum)
finalCompleteTest.Leftpct = Int(leftpct)
finalCompleteTest.Rightpct = Int(rightpct)
finalCompleteTest.Centerpct = Int(centerpct)
finalCompleteTest.Totalpct = Int(totalpct)
finalCompleteTest.BadContactpct = Int(badcontactpct)
} else {
print("oh no, segue.destination is not a FinalCompleteTest")
}
}

If you can see that message in your console, probably you haven't connected something correctly on the storyboard.

If not, try to give us some more information.

If you don't understand the "dangers" of using ! in your code, please try to understand Optionals first and don't hesitate to ask if you need more help.

Good luck!

Thread 1: signal SIGABRT in swift

In MemoListVC.swift, I noticed that you instantiated the view controller with identifier "MemoRead". Is this identifier identical to the one you set for the view controller you want to instantiate, but in the storyboard? If not, that might be what is throwing your code off.

If it isn't identical, then go to the storyboard, select the view controller, and go to the identity inspector (3rd icon from the left in Xcode 10) on the inspector sidebar on the right, and change the name of the identifier you are using to instantiate, in the MemoListVC.swift, to the one that is listed in the storyboard identity inspector under "Storyboard ID".

How to solve the Thread 1: signal SIGABRT error in Xcode?

Have you checked your @IBAction and @IBOutlet are correctly binded to your storyboard ?

'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key savePerson.' feels like either the @IBAction or IBOutlet is not correctly binded, or that you didn't set the class correctly for your view controllers in your storyboard. looks to me like it is trying to access the method savePerson but cannot find it in the binded class.

Swift signal SIGABRT error on UITableView

There are two mistakes from the log you attached:

  • Unknown class TeacherCell means that you probably assigned to a
    UITableViewCell the custom class named TeacherCell, but this class
    does not exist (or it's called in another way).

  • this class is not key value code-compliant for the key
    facultyNameLabel
    means that you probably have a label named
    facultyNameLabel in your storyboard/XIB but it is not present in the
    related swift file. Try to ctrl-click in every cell of your tableview
    and search for a yellow triangle.



Related Topics



Leave a reply



Submit