Debugging Error: Thread 1: signal SIGABRT

Hello, I've been trying to find away past the error I'm getting on my xcode project the last few days. I know generally the error "Thread 1: signal SIGABRT" is caused by missing code after you link a button or something from deleting it, but I don't think this is the same case considering the code doesn't have anything linked. I've done a lot of Googling and YouTubing, but I can't seem to find the problem. On line 54 under MenuController.swift i get the error "Thread 1: signal SIGABRT".


/
        let cell = tableView.dequeueReusableCell(withIdentifier: "MenuCell") as! MenuCell


I will link the project and images. I'm not sure why it's doing it, but anything will help. Thank you so much.


I'm also using the cocoapod "SlideMenuControllerSwift" https://github.com/dekatotoro/SlideMenuControllerSwift


https://image.ibb.co/gt39bH/Screen_Shot_2018_02_05_at_6_34_26_PM.png

https://image.ibb.co/kLLBqc/Screen_Shot_2018_02_05_at_6_34_42_PM.png


Project: http://www.mediafire.com/file/w1e11bwea7dot1b/B%26G+Club.zip

Answered by QuinceyMorris in 292991022

>> generally the error "Thread 1: signal SIGABRT" is caused by missing code


Not really. A signal is just really a way that an application can tell the underlying Unix kernel that something important happened (that's what "signal" really means), but it's usually something bad, and usually represents a crash. The SIGABRT signal specifically indicates that your app called the "abort()" function, which is how apps crash themselves intentionally.


The key to understanding a SIGABRT, therefore, is the error message displayed as part of the abort. In your case, you show this message in your second linked image. The "as!" operator triggered the abort because it the type of the dequeued table cell wasn't MenuCell as you wanted, but was just a plain ol' UITableViewCell.


The most likely reason for this is in your storyboard. You have defined a custom table cell, and given it the "MenuCell" identifier, but you haven't changed its class from the default UITableViewCell to MenuCell (which apparently is a class as well as a cell identifier). To change it:


— Select the cell in your storyboard.


— In the Identity inspector on the right (Command-Option-3), enter "MenuCell" for the class. If this class is actually defined in the SlideMenuControllerSwift framework, make sure Xcode shows the correct module name in the second field.

>> generally the error "Thread 1: signal SIGABRT" is caused by missing code


Not really. A signal is just really a way that an application can tell the underlying Unix kernel that something important happened (that's what "signal" really means), but it's usually something bad, and usually represents a crash. The SIGABRT signal specifically indicates that your app called the "abort()" function, which is how apps crash themselves intentionally.


The key to understanding a SIGABRT, therefore, is the error message displayed as part of the abort. In your case, you show this message in your second linked image. The "as!" operator triggered the abort because it the type of the dequeued table cell wasn't MenuCell as you wanted, but was just a plain ol' UITableViewCell.


The most likely reason for this is in your storyboard. You have defined a custom table cell, and given it the "MenuCell" identifier, but you haven't changed its class from the default UITableViewCell to MenuCell (which apparently is a class as well as a cell identifier). To change it:


— Select the cell in your storyboard.


— In the Identity inspector on the right (Command-Option-3), enter "MenuCell" for the class. If this class is actually defined in the SlideMenuControllerSwift framework, make sure Xcode shows the correct module name in the second field.

I tried your steps and I still am getting the error. I tried tweaking around with it and I can't find a fix 😟

Sorry if I missed it - which version Xcode are you using?

It was solved just as you pointed out QuinceyMorris. Thank you.

Debugging Error: Thread 1: signal SIGABRT
 
 
Q