Confusing Crashlytics reports from TestFlight distributed app - ios

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

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/

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

Related

Random crashes in IOS

I have this app in the app store, which according to Crashalitics, its %92-%95 stable. I made a similar app for Android and its around 98% stable. I am trying to get the stability up - but I don't see how. All the bugs I am seeing in the IOS version are not touching my code.
I see random bugs, that are not reproducible, and when they do are very random. Each happens 1-10 times, but I have a list of ... ~30 different items.
The app is pretty simple - a mostly linear storyboard (a few jumps, but no loops). The only project I am using which is not Apple's code is InAppSettingsKit, and most of the app is just maps which shows some items. The project is using ARC and currently compiled using XCode6 (but XCode5 showed the same symptoms).
How can I find these crashes? Is this in an inherent problem of IOS7-8? I do see some apps just closing up when I use the IPhone, and friends to tell me that IOS is not that stable, but ... I just think I am doing something wrong.
IOS8 70% IOS7 30%
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x36444f66 objc_msgSend + 5
1 UIKit 0x2c160b35 -[UIScrollView(UIScrollViewInternal) _delegateScrollViewAnimationEnded] + 52
2 UIKit 0x2c160ac1 -[UIScrollView(UIScrollViewInternal) _scrollViewAnimationEnded:finished:] + 184
3 UIKit 0x2c20a5e5 -[UIAnimator stopAnimation:] + 476
4 UIKit 0x2c209fb9 -[UIAnimator(Static) _advanceAnimationsOfType:withTimestamp:] + 304
5 UIKit 0x2c209e85 -[UIAnimator(Static) _LCDHeartbeatCallback:] + 52
6 QuartzCore 0x2bae4aeb CA::Display::DisplayLinkItem::dispatch() + 98
7 QuartzCore 0x2bae4953 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 366
8 IOMobileFramebuffer 0x303c482f IOMobileFramebufferVsyncNotifyFunc + 90
9 IOKit 0x29af01ed IODispatchCalloutFromCFMessage + 256
10 CoreFoundation 0x28b7c3a5 __CFMachPortPerform + 132
11 CoreFoundation 0x28b8c7f3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
12 CoreFoundation 0x28b8c78f __CFRunLoopDoSource1 + 346
13 CoreFoundation 0x28b8adb1 __CFRunLoopRun + 1608
14 CoreFoundation 0x28ad7b31 CFRunLoopRunSpecific + 476
15 CoreFoundation 0x28ad7943 CFRunLoopRunInMode + 106
16 GraphicsServices 0x2feb7051 GSEventRunModal + 136
17 UIKit 0x2c0cd6f1 UIApplicationMain + 1440
18 --------------- 0x000c8833 main (main.m:16)
IOS7 - 8 times
Thread : Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x2e23ef83 __exceptionPreprocess + 130
1 libobjc.A.dylib 0x389efccf objc_exception_throw + 38
2 CoreFoundation 0x2e242917 -[NSObject(NSObject) doesNotRecognizeSelector:] + 202
3 CoreFoundation 0x2e241203 ___forwarding___ + 706
4 CoreFoundation 0x2e190768 _CF_forwarding_prep_0 + 24
5 VectorKit 0x35ec6911 -[VKMapCanvas initShouldRasterize:contentScale:inBackground:] + 476
6 VectorKit 0x35ec620f -[VKMapView initWithGlobe:shouldRasterize:inBackground:] + 230
7 MapKit 0x2f3d980b -[MKBasicMapView initWithFrame:andGlobe:shouldRasterize:] + 322
8 MapKit 0x2f40cd77 -[MKMapView _commonInitAndEnableLoading:fromIB:gestureRecognizerHostView:showsAttribution:] + 878
9 MapKit 0x2f40d86b -[MKMapView initWithCoder:] + 134
10 UIKit 0x30e70169 UINibDecoderDecodeObjectForValue + 740
11 UIKit 0x30e6fe7f -[UINibDecoder decodeObjectForKey:] + 90
12 UIKit 0x30dcb5ff -[UIRuntimeConnection initWithCoder:] + 150
13 UIKit 0x30e70169 UINibDecoderDecodeObjectForValue + 740
14 UIKit 0x30e70109 UINibDecoderDecodeObjectForValue + 644
15 UIKit 0x30e6fe7f -[UINibDecoder decodeObjectForKey:] + 90
16 UIKit 0x30dcadd1 -[UINib instantiateWithOwner:options:] + 888
17 UIKit 0x30d2360b -[UIViewController _loadViewFromNibNamed:bundle:] + 234
18 UIKit 0x30b7fbcd -[UIViewController loadView] + 92
19 UIKit 0x30a602ed -[UIViewController loadViewIfRequired] + 72
20 UIKit 0x30a60269 -[UIViewController view] + 24
21 UIKit 0x30b0a14b -[UINavigationController _startTransition:fromViewController:toViewController:] + 198
22 UIKit 0x30b09dfd -[UINavigationController _startDeferredTransitionIfNeeded:] + 572
23 UIKit 0x30b09b6d -[UINavigationController __viewWillLayoutSubviews] + 44
24 UIKit 0x30b09b05 -[UILayoutContainerView layoutSubviews] + 184
25 UIKit 0x30a5bd59 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 380
26 QuartzCore 0x306d962b -[CALayer layoutSublayers] + 142
27 QuartzCore 0x306d4e3b CA::Layer::layout_if_needed(CA::Transaction*) + 350
28 QuartzCore 0x30703cdd -[CALayer layoutIfNeeded] + 140
29 UIKit 0x30ad8163 -[UIViewController window:setupWithInterfaceOrientation:] + 242
30 UIKit 0x30ad6783 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 3498
31 UIKit 0x30ad59d3 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 46
32 UIKit 0x30ad595b -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 94
33 UIKit 0x30ad58f3 -[UIWindow _setRotatableViewOrientation:duration:force:] + 42
34 UIKit 0x30acdf69 __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke + 108
35 UIKit 0x30a62107 -[UIWindow _updateToInterfaceOrientation:duration:force:] + 382
36 UIKit 0x30ad5641 -[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 696
37 UIKit 0x30ad5105 -[UIViewController _tryBecomeRootViewControllerInWindow:] + 164
38 UIKit 0x30a67045 -[UIWindow addRootViewControllerViewIfPossible] + 460
39 UIKit 0x30a64827 -[UIWindow _setHidden:forced:] + 302
40 UIKit 0x30ace33d -[UIWindow makeKeyAndVisible] + 60
41 UIKit 0x30acafad -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1820
42 UIKit 0x30ac556b -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 714
43 UIKit 0x30a616e9 -[UIApplication handleEvent:withNewEvent:] + 3540
44 UIKit 0x30a60851 -[UIApplication sendEvent:] + 72
45 UIKit 0x30ac4ca9 _UIApplicationHandleEvent + 616
46 GraphicsServices 0x33079aed _PurpleEventCallback + 608
47 GraphicsServices 0x330796d7 PurpleEventCallback + 34
48 CoreFoundation 0x2e209a67 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
49 CoreFoundation 0x2e209a03 __CFRunLoopDoSource1 + 346
50 CoreFoundation 0x2e2081d7 __CFRunLoopRun + 1398
51 CoreFoundation 0x2e172ebf CFRunLoopRunSpecific + 522
52 CoreFoundation 0x2e172ca3 CFRunLoopRunInMode + 106
53 UIKit 0x30ac3ed1 -[UIApplication _run] + 760
54 UIKit 0x30abf14d UIApplicationMain + 1136
55 --------------- 0x000ef833 main (main.m:16)
56 libdyld.dylib 0x38efcab7 start + 2
Another (IOS 6.1.6)
vThread : Fatal Exception: NSGenericException
0 CoreFoundation 0x31eaf2a3 __exceptionPreprocess + 162
1 libobjc.A.dylib 0x39b0b97f objc_exception_throw + 30
2 UIKit 0x3404d30f -[UIStoryboardPushSegue perform] + 1118
3 UIKit 0x33da20c5 -[UIApplication sendAction:to:from:forEvent:] + 72
4 UIKit 0x33da214d -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 120
5 UIKit 0x33da20c5 -[UIApplication sendAction:to:from:forEvent:] + 72
6 UIKit 0x33da2077 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
7 UIKit 0x33da2055 -[UIControl sendAction:to:forEvent:] + 44
8 UIKit 0x33da190b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 502
9 UIKit 0x33da1e01 -[UIControl touchesEnded:withEvent:] + 488
10 UIKit 0x33cca5f1 -[UIWindow _sendTouchesForEvent:] + 524
11 UIKit 0x33cb7801 -[UIApplication sendEvent:] + 380
12 UIKit 0x33cb711b _UIApplicationHandleEvent + 6154
13 GraphicsServices 0x359735a3 _PurpleEventCallback + 590
14 GraphicsServices 0x359731d3 PurpleEventCallback + 34
15 CoreFoundation 0x31e84173 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
16 CoreFoundation 0x31e84117 __CFRunLoopDoSource1 + 138
17 CoreFoundation 0x31e82f99 __CFRunLoopRun + 1384
18 CoreFoundation 0x31df5ebd CFRunLoopRunSpecific + 356
19 CoreFoundation 0x31df5d49 CFRunLoopRunInMode + 104
20 GraphicsServices 0x359722eb GSEventRunModal + 74
21 UIKit 0x33d0b301 UIApplicationMain + 1120
22 --------------- 0x00116833 main (main.m:16)
23 libdyld.dylib 0x39f42b20 start

crash while updating the app from version (which doesn't have core data) to version (which has core data added newly)

I am using MagicalRecord for saving the Data into DB.And when i try to update the app to core data version .
I am getting exception on the first time i try to save some thing
[MagicalRecord saveWithBlockAndWait:^(NSManagedObjectContext *localContext) {
MenuModel *menuModel = [CDMenuModel insertInManagedObjectContext:localContext];
menuModel.sectionTitle = tibbrLocalizedString(#"menu_view.menuItem_mainWall.menu", #"Main Wall");
menuModel.indexPath = [NSNumber numberWithInt:1];
}];
Please find the crash stack trace for your ref
And also let me know your finding based on the crash log below
Thread 0 Crashed:
0 libobjc.A.dylib 0x38760627 objc_msgSend + 7
1 Foundation 0x2e8e6029 -[NSError dealloc] + 57
2 libobjc.A.dylib 0x38765b67 objc_object::sidetable_release(bool) + 171
3 libobjc.A.dylib 0x387660cf (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 355
4 CoreFoundation 0x2def74bd _CFAutoreleasePoolPop + 13
5 Foundation 0x2e8f08df -[NSAutoreleasePool drain] + 119
6 CoreData 0x2dd37fbb -[NSManagedObjectContext save:] + 939
7 appname_test 0x002f2f7b 0x8e000 + 2510715
8 CoreData 0x2dd9b9cb developerSubmittedBlockToNSManagedObjectContextPerform + 87
9 CoreData 0x2dd9bb0f -[NSManagedObjectContext performBlockAndWait:] + 111
10 appname_test 0x002f2ecf 0x8e000 + 2510543
11 CoreData 0x2dd9b9cb developerSubmittedBlockToNSManagedObjectContextPerform + 87
12 libdispatch.dylib 0x38c3fd3d _dispatch_client_callout + 21
13 libdispatch.dylib 0x38c446bf _dispatch_barrier_sync_f_invoke + 23
14 CoreData 0x2dd9bb07 -[NSManagedObjectContext performBlockAndWait:] + 103
15 appname_test 0x001807e9 0x8e000 + 993257
16 appname_test 0x002509d1 0x8e000 + 1845713
17 appname_test 0x0026d497 0x8e000 + 1963159
18 appname_test 0x00265be7 0x8e000 + 1932263
19 UIKit 0x307f7a4f -[UIViewController loadViewIfRequired] + 515
20 UIKit 0x307f780d -[UIViewController view] + 21
21 UIKit 0x3086ec39 -[UIClientRotationContext initWithClient:toOrientation:duration:andWindow:] + 385
22 UIKit 0x3086d59d -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 1197
23 UIKit 0x3086d0e3 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 43
24 UIKit 0x3086d06b -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 91
25 UIKit 0x3086d003 -[UIWindow _setRotatableViewOrientation:duration:force:] + 39
26 UIKit 0x3086567d __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke + 105
27 UIKit 0x307f9695 -[UIWindow _updateToInterfaceOrientation:duration:force:] + 381
28 UIKit 0x3086cd55 -[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 693
29 UIKit 0x3086c825 -[UIViewController _tryBecomeRootViewControllerInWindow:] + 157
30 UIKit 0x307fe611 -[UIWindow addRootViewControllerViewIfPossible] + 457
31 UIKit 0x307fbdd5 -[UIWindow _setHidden:forced:] + 301
32 UIKit 0x30865a4d -[UIWindow makeKeyAndVisible] + 57
33 appname_test 0x0037ae55 0x8e000 + 3067477
34 UIKit 0x30862cbd -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 273
35 UIKit 0x3086260f -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1607
36 UIKit 0x3085ccc5 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 717
37 UIKit 0x307f8c93 -[UIApplication handleEvent:withNewEvent:] + 3547
38 UIKit 0x307f7df5 -[UIApplication sendEvent:] + 69
39 UIKit 0x3085c401 _UIApplicationHandleEvent + 613
40 GraphicsServices 0x32e55b53 _PurpleEventCallback + 607
41 GraphicsServices 0x32e5573b PurpleEventCallback + 31
42 CoreFoundation 0x2df8e845 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 33
43 CoreFoundation 0x2df8e7df __CFRunLoopDoSource1 + 343
44 CoreFoundation 0x2df8cfab __CFRunLoopRun + 1403
45 CoreFoundation 0x2def7765 CFRunLoopRunSpecific + 521
46 CoreFoundation 0x2def7547 CFRunLoopRunInMode + 103
47 UIKit 0x3085b627 -[UIApplication _run] + 759
48 UIKit 0x3085688d UIApplicationMain + 1133
49 appname_test 0x0009b5cd 0x8e000 + 54733
50 libdyld.dylib 0x38c54ab5 start + 1

Random SIGSEGV NSFetchedResultsController crash

Receiving random crash reports related to NSFetchedResultsController updates to a UITableView, but I'm having a difficult time deciphering the crash log since it's all internal iOS methods.
This occurs at random times after data is fetched from a server in a background queue and the app populates new NSManagedObjects in the background into a Core Data Persistent Store.
Does anyone have an understanding of what may be going on here?
SIGSEGV
0 libobjc.A.dylib 0x3930b752 lookUpImpOrForward + 46
1 libobjc.A.dylib 0x39303feb _class_lookupMethodAndLoadCache3 + 35
2 libobjc.A.dylib 0x39303db9 _objc_msgSend_uncached + 25
3 UIKit 0x317b2bbf __66-[UISectionRowData refreshWithSection:tableView:tableViewRowData:]_block_invoke + 451
4 UIKit 0x31778179 -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] + 3717
5 UIKit 0x3189c95b -[UITableViewRowData ensureAllSectionsAreValid] + 167
6 UIKit 0x31873f29 -[UITableView _endCellAnimationsWithContext:] + 217
7 CoreData 0x2ecae7dd -[NSFetchedResultsController(PrivateMethods) _managedObjectContextDidChange:] + 4013
8 CoreFoundation 0x2eef4121 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 13
9 CoreFoundation 0x2ee68317 _CFXNotificationPost + 1719
10 Foundation 0x2f84cdcd -[NSNotificationCenter postNotificationName:object:userInfo:] + 77
11 CoreData 0x2ecad813 -[NSManagedObjectContext(_NSInternalNotificationHandling) _postObjectsDidChangeNotificationWithUserInfo:] + 79
12 CoreData 0x2ecad7ab -[NSManagedObjectContext(_NSInternalChangeProcessing) _createAndPostChangeNotification:withDeletions:withUpdates:withRefreshes:] + 299
13 CoreData 0x2ecabe13 -[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:] + 2367
14 CoreData 0x2ed159e3 -[NSManagedObjectContext(_NestedContextSupport) _parentProcessSaveRequest:inContext:error:] + 1315
15 CoreData 0x2ed1632f __82-[NSManagedObjectContext(_NestedContextSupport) executeRequest:withContext:error:]_block_invoke + 563
16 libdispatch.dylib 0x397f31a7 _dispatch_barrier_sync_f_slow_invoke + 67
17 libdispatch.dylib 0x397ebd67 _dispatch_client_callout + 23
18 libdispatch.dylib 0x397f27c1 _dispatch_main_queue_callback_4CF$VARIANT$mp + 269
19 CoreFoundation 0x2eefc821 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
20 CoreFoundation 0x2eefb0f5 __CFRunLoopRun + 1301
21 CoreFoundation 0x2ee65ce7 CFRunLoopRunSpecific + 523
22 CoreFoundation 0x2ee65acb CFRunLoopRunInMode + 107
23 GraphicsServices 0x33b86283 GSEventRunModal + 139
24 UIKit 0x31707a41 UIApplicationMain + 1137
25 0x000ba53f main (main.m:16)

iOS - Determining the cause of a crash (from a crash report) in _WebTryThreadLock

I have been trying to figure out what is causing one of the top crashes in my iOS application. It looks like there is some layout happening on a background thread which is causing it to crash. Is there any way to determine what I might be doing that is triggering this relayout? I assume from the stack that it is related to a UIWebView when my app is being brought back into the foreground.
Other stackoverflow threads on the topic seem to mention things like triggering a table reload on a background thread. As far as I can see all the webView delegate methods get called on the main thread. Is there some case where this is not true or are there some other methods which get called on a background thread and I'm just not aware?
Web Thread - Crashed.
0 WebCore _WebTryThreadLock(bool) + 297
1 WebCore _WebTryThreadLock(bool) + 288
2 WebCore WebThreadLock + 66
3 UIKit -[UIWebDocumentView(UIWebDocumentViewTextSelecting) selectionBaseWritingDirection] + 10
4 UIKit -[UITextField _currentTextAlignment] + 86
5 UIKit -[UITextField _showsClearButtonWhenNonEmpty:] + 58
6 UIKit -[UITextField _textRectForBounds:forEditing:] + 678
7 UIKit -[UITextField editingRectForBounds:] + 52
8 UIKit -[UITextField editRect] + 70
9 UIKit -[UITextField layoutSubviews] + 1320
10 UIKit -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 258
11 QuartzCore -[CALayer layoutSublayers] + 214
12 QuartzCore CA::Layer::layout_if_needed(CA::Transaction*) + 460
13 QuartzCore CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 16
14 QuartzCore CA::Context::commit_transaction(CA::Transaction*) + 238
15 QuartzCore CA::Transaction::commit() + 316
16 QuartzCore CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 60
17 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
18 CoreFoundation __CFRunLoopDoObservers + 276
19 CoreFoundation CFRunLoopRunSpecific + 394
20 CoreFoundation CFRunLoopRunInMode + 104
21 WebCore RunWebThread(void*) + 444
22 libsystem_c.dylib pthread_start + 308
Main - Thread
0 libsystem_kernel.dylib __psynch_mutexwait + 24
1 libsystem_c.dylib pthread_mutex_lock + 392
2 WebCore _WebTryThreadLock(bool) + 336
3 WebCore WebThreadLock + 66
4 WebKit -[WebDatabasePauser applicationWillEnterForeground] + 16
5 CoreFoundation _CFXNotificationPost + 1426
6 Foundation -[NSNotificationCenter postNotificationName:object:userInfo:] + 72
7 UIKit -[UIApplication _sendWillEnterForegroundCallbacks] + 154
8 UIKit -[UIApplication _handleApplicationResumeEvent:] + 1094
9 UIKit -[UIApplication handleEvent:withNewEvent:] + 1292
10 UIKit -[UIApplication sendEvent:] + 72
11 UIKit _UIApplicationHandleEvent + 6154
12 GraphicsServices _PurpleEventCallback + 590
13 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
14 CoreFoundation __CFRunLoopDoSources0 + 212
15 CoreFoundation __CFRunLoopRun + 646
16 CoreFoundation CFRunLoopRunSpecific + 356
17 CoreFoundation CFRunLoopRunInMode + 104
18 GraphicsServices GSEventRunModal + 74
19 UIKit UIApplicationMain + 1120
20 AppName main.m line 23
It seems you are updating UI on the background thread, in your code add this line wherever you are updating your UI and you are fetching data on the background thread:
dispatch_async(dispatch_get_main_queue(), ^{
// Update data here
});
As soon as you, rather code feels that data is there on device and it's time to update the UI corresponding to new data then try and bring back main thread in action.
Hope it helps.

iOS App crashes in Archive Build but not Release/Run

I am getting the following crash log from my app when run from an archived build
0 AllPaste 0x000a16c1 AllPaste + 108225
1 AllPaste 0x000a1ad7 AllPaste + 109271
2 libsystem_c.dylib 0x38215539 _sigtramp + 48
3 CoreData 0x37321921 -[_PFManagedObjectReferenceQueue _processReferenceQueue:] + 940
4 CoreData 0x3737fd0f -[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:] + 3046
5 CoreData 0x3730975d -[NSManagedObjectContext executeFetchRequest:error:] + 452
6 CoreData 0x373e5e51 -[NSFetchedResultsController performFetch:] + 540
7 AllPaste 0x000953e7 AllPaste + 58343
8 AllPaste 0x00095f09 AllPaste + 61193
9 AllPaste 0x000924c3 AllPaste + 46275
10 UIKit 0x31e436b5 -[UIViewController _setViewAppearState:isAnimating:] + 144
11 UIKit 0x31e438c1 -[UINavigationController viewWillAppear:] + 288
12 UIKit 0x31e436b5 -[UIViewController _setViewAppearState:isAnimating:] + 144
13 UIKit 0x31e9d1f3 -[UITabBarController viewWillAppear:] + 210
14 UIKit 0x31e436b5 -[UIViewController _setViewAppearState:isAnimating:] + 144
15 UIKit 0x31e9e61b -[UIViewController beginAppearanceTransition:animated:] + 190
16 UIKit 0x31ee4691 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 4076
17 UIKit 0x31f3e461 -[UIViewController _dismissViewControllerWithTransition:from:completion:] + 1732
18 UIKit 0x31ea1af1 -[UIViewController dismissViewControllerWithTransition:completion:] + 756
19 UIKit 0x31ea1af1 -[UIViewController dismissViewControllerWithTransition:completion:] + 756
20 AllPaste 0x0008a9eb AllPaste + 14827
21 CoreFoundation 0x37183435 -[NSObject performSelector:withObject:withObject:] + 52
22 UIKit 0x31e1c9eb -[UIApplication sendAction:to:from:forEvent:] + 62
23 UIKit 0x31ee23cf -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 118
24 CoreFoundation 0x37183435 -[NSObject performSelector:withObject:withObject:] + 52
25 UIKit 0x31e1c9eb -[UIApplication sendAction:to:from:forEvent:] + 62
26 UIKit 0x31e1c9a7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
27 UIKit 0x31e1c985 -[UIControl sendAction:to:forEvent:] + 44
28 UIKit 0x31e1c6f5 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 492
29 UIKit 0x31e1d02d -[UIControl touchesEnded:withEvent:] + 476
30 UIKit 0x31e1b50f -[UIWindow _sendTouchesForEvent:] + 318
31 UIKit 0x31e1af01 -[UIWindow sendEvent:] + 380
32 UIKit 0x31e014ed -[UIApplication sendEvent:] + 356
33 UIKit 0x31e00d2d _UIApplicationHandleEvent + 5808
34 GraphicsServices 0x32e5be13 PurpleEventCallback + 882
35 CoreFoundation 0x371fd553 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
36 CoreFoundation 0x371fd4f5 __CFRunLoopDoSource1 + 140
37 CoreFoundation 0x371fc343 __CFRunLoopRun + 1370
38 CoreFoundation 0x3717f4dd CFRunLoopRunSpecific + 300
39 CoreFoundation 0x3717f3a5 CFRunLoopRunInMode + 104
40 GraphicsServices 0x32e5afed GSEventRunModal + 156
41 UIKit 0x31e2f743 UIApplicationMain + 1090
42 AllPaste 0x00088e97 AllPaste + 7831
43 AllPaste 0x00088e50 AllPaste + 7760`
This only happens when I archive and install the app but not when I Run it through Xcode, however both are using the same Ad Hoc build configuration.
Does anyone know why this would be occurring or can identify my error from the log?
It turns out that earlier in the project I had enabled zombies and forgot about it. So that when I was running the simulator and testing on my device it was not detecting a released object. But when I archived build and then shared it into an ipa through the organizer I lost the zombie enabled (of course) and it was not updating the table and throwing my error.
Looks like you are having problems with Core Data. Did you happen to change your data model on the updated app and have an older version of the data model on the device? The crash could be a result of the data models being inconsistent. If that is the case you will need to migrate from the old model to the new one.

Resources