1

I've joined an already-started iOS app project. Whenever I debug the app, my app hits a breakpoint on app launch (at return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));) if All Exceptions breakpoint is enabled. If I hit resume a few times (or disable the breakpoint), the app starts and goes to the main screen without any problem, however, the breakpoint hits every time I launch the app and it's pretty annoying while debugging.

How can I find the cause of the problem? (as the app was handed to me as-is, I have no way of knowing what started causing it in the first place) Here is the stack trace from the exception:

enter image description here

(sorry for posting as image, I don't think there's a way to post it as text)

It seems to be related to some font files (from the stack trace), and the project did have some custom fonts at earlier stages, however I've eliminated all instances of custom fonts from storyboards, replacing them with system fonts. Though the problem persists. How can I pinpoint the exact cause?

Can Poyrazoğlu
  • 33,241
  • 48
  • 191
  • 389
  • see here: http://stackoverflow.com/questions/26127004/xcode-throws-an-exception-in-main-in-ios-8-with-all-exceptions-breakpoint – Sargis May 11 '17 at 08:57
  • This usually means your custom fonts are still referenced somewhere. Check your project file (project.pbxproj), your storyboards and xib files (any text editor would work). Some people would suggest ignoring C++ exceptions but that's not a sufficient solution in my experience. Just find these font references and remove it. – Moshe Gottlieb May 11 '17 at 09:11
  • Probably font reference still in the info.plist. – GeneCode May 11 '17 at 09:20
  • @iMoses yep, that was it. they weren't referenced anywhere that was initially loaded on my app, but for some reason, it was still causing the exception (even though nibs containing the font weren't loaded at all). I've removed every single instance and the problem went away. – Can Poyrazoğlu May 14 '17 at 13:09

0 Answers0