Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Swift how to debug SIGABRT :"fatal error: call of deleted method" from a CocoaPod?

I have an app which uses SlideMenuControllerSwift. I've modified some code to see how to present different panels, then rolled back my changes.

When running the project I get SIGABRT fatal error: call of deleted method in console when SlideMenuControllerSwift is initializing. No other error messages are given.

  • The project's source control appears to be in exactly the same state as before changes.
  • I did a "clean"
  • Reinstalled pods.
  • Deleted pods directory and made a clean install
  • Deleted app from device and ran again
  • Did a fresh checkout into a different folder
  • Updated cocoapods gem
  • Even modified the function to use self.addLeftGestures()

How do I debug an issue caused by cocoa pod throwing "fatal error: call of deleted method"?

enter image description here

UPDATE: seems like something is seriously broken with the functions inside that pod, calling another function within init causes bad access exception:

enter image description here

like image 518
Alex Stone Avatar asked Jul 12 '17 07:07

Alex Stone


1 Answers

In my case, I had created a project scheme that uses the release build configuration:

Edit Scheme

In this configuration, if your project build settings does not allow testability in this release mode then setting custom breakpoints or app crashes do not let you debug properly and you are served the fatal error: call of deleted method


Solution:

Check the project build settings for "testability".

Project Build Settings

Ensure it is "Yes" for the build configuration you are testing under.

In my case, I temporarily enabled testability for Release by making it Yes.

like image 193
staticVoidMan Avatar answered Nov 04 '22 14:11

staticVoidMan