Question

I'm using TestFlight to distribute a beta app and Crashlytics for crash reporting, but some of the reports I'm getting are pretty useless. Instead of revealing the problematic line of code, the stack trace shows something like this:

-[__TFAppUpdater_Helper .cxx_destruct] + 28868

I have commented out all of the TestFlight SDK calls in my code, but I'm still distributing with TestFlight. I can install the app on my own device via Xcode, bypassing TestFlight, and then Crashlytics produces a helpful report for the same crash. I've seen lots of evidence online that TestFlight and Crashlytics should play nice, but it hasn't been my experience so far.

Example Crashlytics confusing stack trace from an app installed via TestFlight (relevant lines indicated with -->):

Thread : Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x30709fd3 __exceptionPreprocess + 130
1  libobjc.A.dylib                0x3b1ecccf objc_exception_throw + 38
2  CoreData                       0x3045f367 -[NSSQLGenerator newSQLStatementForFetchRequest:ignoreInheritance:countOnly:nestingLevel:] + 914
3  CoreData                       0x3045ee97 -[NSSQLAdapter _newSelectStatementWithFetchRequest:ignoreInheritance:] + 406
4  CoreData                       0x3045eafd -[NSSQLCore newRowsForFetchPlan:] + 116
5  CoreData                       0x3045e23d -[NSSQLCore objectsForFetchRequest:inContext:] + 696
6  CoreData                       0x3045dceb -[NSSQLCore executeRequest:withContext:error:] + 446
7  CoreData                       0x3045d59d -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 2892
8  CoreData                       0x3045b99f -[NSManagedObjectContext executeFetchRequest:error:] + 614
9  CoreData                       0x304e9d33 -[NSManagedObjectContext(_NestedContextSupport) _parentObjectsForFetchRequest:inContext:error:] + 398
10 CoreData                       0x304ea4ab __82-[NSManagedObjectContext(_NestedContextSupport) executeRequest:withContext:error:]_block_invoke + 562
11 libdispatch.dylib              0x3b6d481f _dispatch_client_callout + 22
12 libdispatch.dylib              0x3b6da7cb _dispatch_barrier_sync_f_invoke + 26
13 CoreData                       0x304dfdf3 _perform + 102
14 CoreData                       0x304ea1ad -[NSManagedObjectContext(_NestedContextSupport) executeRequest:withContext:error:] + 240
15 CoreData                       0x3045b99f -[NSManagedObjectContext executeFetchRequest:error:] + 614
16 CoreData                       0x30474e49 -[NSFetchedResultsController performFetch:] + 524
-->17 Titís                         0x00115925 -[__TFAppUpdater_Helper .cxx_destruct] + 28940
-->18 Titís                         0x00114435 -[__TFAppUpdater_Helper .cxx_destruct] + 23580
19 UIKit                          0x32f5b057 -[UIApplication sendAction:to:from:forEvent:] + 90
20 UIKit                          0x32f5aff7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
21 UIKit                          0x32f5afd1 -[UIControl sendAction:to:forEvent:] + 44
22 UIKit                          0x32f46737 -[UIControl _sendActionsForEvents:withEvent:] + 374
-->23 Titís                         0x0011e599 -[__TFAppUpdater_Helper .cxx_destruct] + 64896
24 UIKit                          0x33198cc5 -[UIPickerView _sendSelectionChangedForComponent:notify:] + 92
25 UIKit                          0x333ef4f7 -[UIPickerTableView _scrollingFinished] + 154
26 UIKit                          0x330c1977 -[UIScrollView(UIScrollViewInternal) _stopScrollDecelerationNotify:] + 806
27 UIKit                          0x32ff7d67 -[UIScrollView(UIScrollViewInternal) _stopScrollingNotify:pin:tramplingDragFlags:] + 466
28 UIKit                          0x32ff7b8b -[UIScrollView(UIScrollViewInternal) _stopScrollingNotify:pin:] + 30
29 UIKit                          0x330c123b -[UIScrollView _smoothScrollWithUpdateTime:] + 3322
30 QuartzCore                     0x32bf1df3 CA::Display::DisplayLinkItem::dispatch() + 98
31 QuartzCore                     0x32bf1b9d CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 344
32 IOMobileFramebuffer            0x3595f75d IOMobileFramebufferVsyncNotifyFunc + 104
33 IOKit                          0x313f4451 IODispatchCalloutFromCFMessage + 248
34 CoreFoundation                 0x306c9ef9 __CFMachPortPerform + 136
35 CoreFoundation                 0x306d4ab7 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
36 CoreFoundation                 0x306d4a53 __CFRunLoopDoSource1 + 346
37 CoreFoundation                 0x306d3227 __CFRunLoopRun + 1398
38 CoreFoundation                 0x3063df4f CFRunLoopRunSpecific + 522
39 CoreFoundation                 0x3063dd33 CFRunLoopRunInMode + 106
40 GraphicsServices               0x35537663 GSEventRunModal + 138
41 UIKit                          0x32f8916d UIApplicationMain + 1136
-->42 Titís                         0x000ee657 main (main.m:16)
43 libdyld.dylib                  0x3b6f9ab7 start + 2

Example Crashlytics helpful stack trace from an app installed via Xcode (relevant lines indicated with -->):

Thread : Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x30709fd3 __exceptionPreprocess + 130
1  libobjc.A.dylib                0x3b1ecccf objc_exception_throw + 38
2  CoreData                       0x3045f367 -[NSSQLGenerator newSQLStatementForFetchRequest:ignoreInheritance:countOnly:nestingLevel:] + 914
3  CoreData                       0x3045ee97 -[NSSQLAdapter _newSelectStatementWithFetchRequest:ignoreInheritance:] + 406
4  CoreData                       0x3045eafd -[NSSQLCore newRowsForFetchPlan:] + 116
5  CoreData                       0x3045e23d -[NSSQLCore objectsForFetchRequest:inContext:] + 696
6  CoreData                       0x3045dceb -[NSSQLCore executeRequest:withContext:error:] + 446
7  CoreData                       0x3045d59d -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 2892
8  CoreData                       0x3045b99f -[NSManagedObjectContext executeFetchRequest:error:] + 614
9  CoreData                       0x304e9d33 -[NSManagedObjectContext(_NestedContextSupport) _parentObjectsForFetchRequest:inContext:error:] + 398
10 CoreData                       0x304ea4ab __82-[NSManagedObjectContext(_NestedContextSupport) executeRequest:withContext:error:]_block_invoke + 562
11 libdispatch.dylib              0x3b6d481f _dispatch_client_callout + 22
12 libdispatch.dylib              0x3b6da7cb _dispatch_barrier_sync_f_invoke + 26
13 CoreData                       0x304dfdf3 _perform + 102
14 CoreData                       0x304ea1ad -[NSManagedObjectContext(_NestedContextSupport) executeRequest:withContext:error:] + 240
15 CoreData                       0x3045b99f -[NSManagedObjectContext executeFetchRequest:error:] + 614
16 CoreData                       0x30474e49 -[NSFetchedResultsController performFetch:] + 524
-->17 Titís                         0x000e983d -[EntityListCell initFetchedResults] (EntityListCell.m:242)
-->18 Titís                         0x000e834d -[EntityListCell sortPickerChanged:] (EntityListCell.m:79)
19 UIKit                          0x32f5b057 -[UIApplication sendAction:to:from:forEvent:] + 90
20 UIKit                          0x32f5aff7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
21 UIKit                          0x32f5afd1 -[UIControl sendAction:to:forEvent:] + 44
22 UIKit                          0x32f46737 -[UIControl _sendActionsForEvents:withEvent:] + 374
-->23 Titís                         0x000f24b1 -[ObjectPicker pickerView:didSelectRow:inComponent:] (ObjectPicker.m:173)
24 UIKit                          0x33198cc5 -[UIPickerView _sendSelectionChangedForComponent:notify:] + 92
25 UIKit                          0x333ef4f7 -[UIPickerTableView _scrollingFinished] + 154
26 UIKit                          0x330c1977 -[UIScrollView(UIScrollViewInternal) _stopScrollDecelerationNotify:] + 806
27 UIKit                          0x32ff7d67 -[UIScrollView(UIScrollViewInternal) _stopScrollingNotify:pin:tramplingDragFlags:] + 466
28 UIKit                          0x32ff7b8b -[UIScrollView(UIScrollViewInternal) _stopScrollingNotify:pin:] + 30
29 UIKit                          0x330c123b -[UIScrollView _smoothScrollWithUpdateTime:] + 3322
30 QuartzCore                     0x32bf1df3 CA::Display::DisplayLinkItem::dispatch() + 98
31 QuartzCore                     0x32bf1b9d CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 344
32 IOMobileFramebuffer            0x3595f75d IOMobileFramebufferVsyncNotifyFunc + 104
33 IOKit                          0x313f4451 IODispatchCalloutFromCFMessage + 248
34 CoreFoundation                 0x306c9ef9 __CFMachPortPerform + 136
35 CoreFoundation                 0x306d4ab7 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
36 CoreFoundation                 0x306d4a53 __CFRunLoopDoSource1 + 346
37 CoreFoundation                 0x306d3227 __CFRunLoopRun + 1398
38 CoreFoundation                 0x3063df4f CFRunLoopRunSpecific + 522
39 CoreFoundation                 0x3063dd33 CFRunLoopRunInMode + 106
40 GraphicsServices               0x35537663 GSEventRunModal + 138
41 UIKit                          0x32f8916d UIApplicationMain + 1136
-->42 Titís                         0x000b80ad main (main.m:16)
43 libdyld.dylib                  0x3b6f9ab7 start + 2
Was it helpful?

Solution 2

As suggested, this turned out to be a symbolication issue and changing the build settings in Xcode fixed it. Though I'm not using their platform, I found the solution in the HockeyApp documentation:

For static libraries the build settings contain the following:

Strip Debug Symbols During Copy: No
Strip Style: Debugging Symbols
Strip Linked Product: No

For application targets or OS X frameworks, the build settings should contain the following for the release (App Store) build configuration:

Strip Debug Symbols During Copy: Yes
Strip Style: All Symbols
Strip Linked Product: Yes

OTHER TIPS

I had the same issue with my project the other day and found this tutorial that fixed the issue (by disabling testflight's crash handlers)

http://www.grahamdennis.me/blog/2012/10/21/how-to-disable-testflights-crash-handlers/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top