tbag
tbag

Reputation: 1278

How to debug a main.m iOS app crash

I have integrated Crashlytics in my iOS app which is currently live on the App Store. In my latest update, I am seeing a lot of crashes with the stack trace as below.

Thread : Crashed: com.apple.main-thread
0  libobjc.A.dylib                    0x30f6ef46 objc_msgSend + 5
1  UIKit                              0x26665f07 -[UINavigationController viewWillAppear:] + 406
2  UIKit                              0x265d5b1f -[UIViewController _setViewAppearState:isAnimating:] + 438
3  CoreFoundation                     0x22fcf46d __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke + 48
4  CoreFoundation                     0x22fc84c3 -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 234
5  UIKit                              0x265d5c9b -[UIViewController _setViewAppearState:isAnimating:] + 818
6  UIKit                              0x2688c799 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 584
7  UIKit                              0x26639bd9 _applyBlockToCFArrayCopiedToStack + 308
8  UIKit                              0x265b5dd7 _afterCACommitHandler + 458
9  CoreFoundation                     0x23069ffd __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
10 CoreFoundation                     0x230676bb __CFRunLoopDoObservers + 278
11 CoreFoundation                     0x23067ac3 __CFRunLoopRun + 914
12 CoreFoundation                     0x22fb53b1 CFRunLoopRunSpecific + 476
13 CoreFoundation                     0x22fb51c3 CFRunLoopRunInMode + 106
14 GraphicsServices                   0x2a5a2201 GSEventRunModal + 136
15 UIKit                              0x2661f43d UIApplicationMain + 1440
16 MyApp                              0x00123553 main (main.m:16)

I recently added interstitial ads in my app and I believe the crash is related to that. But how can I get more information from this stack trace or from crashlytics to understand what is really going wrong?

Upvotes: 2

Views: 1634

Answers (1)

Uzaak
Uzaak

Reputation: 578

Have you tried enabling Exception Breakpoints?

1) Inside Xcode, switch to the Breakpoints Navigator (left menu, seventh icon from left to right, it looks just like a breakpoint)

2) Click the + symbol in the lower left corner and choose "Add Exception Breakpoint"

3) Run and crash.

You should now be able to see what really caused the crash.

Upvotes: 1

Related Questions