Search code examples
iosxcodesigabrt

iOS App Crash On PushViewController, but only in TestFlight


In my app, I have a TestFlight beta. It loads fine, and all the buttons and actions work, except for clicking on one section of the TableView, when I click that, it crashes every time. But, only in TestFlight beta installs. On Xcode Simulator it runs fine, if debugging on my phone by plugging into computer and running, it works fine. When I open the crash log in Xcode, I get the image below, but it doesn't really tell me anything. Here is the crash log:

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0

Last Exception Backtrace:
0   CoreFoundation                  0x195260164 __exceptionPreprocess + 228 (NSException.m:199)
1   libobjc.A.dylib                 0x194f74c1c objc_exception_throw + 60 (objc-exception.mm:565)
2   CoreFoundation                  0x19514fbb8 +[NSException raise:format:] + 112 (NSException.m:155)
3   UIKitCore                       0x198cf0d14 -[UISearchDisplayController initWithCoder:] + 88 (UISearchDisplayController.m:350)
4   UIFoundation                    0x1988c793c UINibDecoderDecodeObjectForValue + 728 (UINibDecoder.m:717)
5   UIFoundation                    0x198862d50 -[UINibDecoder decodeObjectForKey:] + 312 (UINibDecoder.m:811)
6   UIKitCore                       0x199029668 -[UIRuntimeConnection initWithCoder:] + 132 (UIRuntimeConnection.m:22)
7   UIFoundation                    0x1988c793c UINibDecoderDecodeObjectForValue + 728 (UINibDecoder.m:717)
8   UIFoundation                    0x1988c7b5c UINibDecoderDecodeObjectForValue + 1272 (UINibDecoder.m:611)
9   UIFoundation                    0x198862d50 -[UINibDecoder decodeObjectForKey:] + 312 (UINibDecoder.m:811)
10  UIKitCore                       0x199024638 -[NSCoder(UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:f... + 492 (UIClassSwapper.m:57)
11  UIKitCore                       0x199027200 -[UINib instantiateWithOwner:options:] + 1068 (UINib.m:347)
12  UIKitCore                       0x198d3dea4 -[UIViewController _loadViewFromNibNamed:bundle:] + 368 (UIViewController.m:3105)
13  UIKitCore                       0x198d3e954 -[UIViewController loadView] + 180 (UIViewController.m:3247)
14  UIKitCore                       0x198d3ec24 -[UIViewController loadViewIfRequired] + 188 (UIViewController.m:3346)
15  UIKitCore                       0x198d3f30c -[UIViewController view] + 32 (UIViewController.m:3404)
16  UIKitCore                       0x198c9afa4 -[UINavigationController _startCustomTransition:] + 1148 (UINavigationController.m:1893)
17  UIKitCore                       0x198caf478 -[UINavigationController _startDeferredTransitionIfNeeded:] + 692 (UINavigationController.m:6719)
18  UIKitCore                       0x198cb0818 -[UINavigationController __viewWillLayoutSubviews] + 176 (UINavigationController.m:6988)
19  UIKitCore                       0x198c934fc -[UILayoutContainerView layoutSubviews] + 228 (UILayoutContainerView.m:86)
20  UIKitCore                       0x1998766a0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2168 (UIView.m:17176)
21  QuartzCore                      0x19bec94a0 -[CALayer layoutSublayers] + 292 (CALayer.mm:9644)
22  QuartzCore                      0x19bec98e0 CA::Layer::layout_if_needed(CA::Transaction*) + 472 (CALayer.mm:9518)
23  QuartzCore                      0x19bedbdc4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 144 (CALayer.mm:2468)
24  QuartzCore                      0x19be20884 CA::Context::commit_transaction(CA::Transaction*, double) + 304 (CAContextInternal.mm:1992)
25  QuartzCore                      0x19be4b3d0 CA::Transaction::commit() + 656 (CATransactionInternal.mm:438)
26  UIKitCore                       0x1993d48cc _afterCACommitHandler + 144 (UIApplication.m:3120)
27  CoreFoundation                  0x1951dac54 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36 (CFRunLoop.c:1758)
28  CoreFoundation                  0x1951d58e4 __CFRunLoopDoObservers + 420 (CFRunLoop.c:1868)
29  CoreFoundation                  0x1951d5d84 __CFRunLoopRun + 1020 (CFRunLoop.c:2910)
30  CoreFoundation                  0x1951d5660 CFRunLoopRunSpecific + 480 (CFRunLoop.c:3192)
31  GraphicsServices                0x19f5e6604 GSEventRunModal + 164 (GSEvent.c:2246)
32  UIKitCore                       0x1993aa15c UIApplicationMain + 1944 (UIApplication.m:4820)
33  Ministry League                 0x104093b48 main + 76 (main.m:16)
34  libdyld.dylib                   0x1950511ec start + 4

Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x0000000195046df0 __pthread_kill + 8
1   libsystem_pthread.dylib         0x0000000194f66930 pthread_kill + 228 (pthread.c:1458)
2   libsystem_c.dylib               0x0000000194ef48b4 abort + 104 (abort.c:110)
3   libc++abi.dylib                 0x0000000195019f40 abort_message + 132 (abort_message.cpp:76)
4   libc++abi.dylib                 0x000000019500b8c8 demangling_terminate_handler() + 308 (cxa_default_handlers.cpp:65)
5   libobjc.A.dylib                 0x0000000194f74f0c _objc_terminate() + 132 (objc-exception.mm:701)
6   libc++abi.dylib                 0x00000001950193cc std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59)
7   libc++abi.dylib                 0x000000019501c154 __cxa_rethrow + 148 (cxa_exception.cpp:617)
8   libobjc.A.dylib                 0x0000000194f74de8 objc_exception_rethrow + 44 (objc-exception.mm:604)
9   CoreFoundation                  0x00000001951d56d0 CFRunLoopRunSpecific + 592 (CFRunLoop.c:3206)
10  GraphicsServices                0x000000019f5e6604 GSEventRunModal + 164 (GSEvent.c:2246)
11  UIKitCore                       0x00000001993aa15c UIApplicationMain + 1944 (UIApplication.m:4820)
12  Ministry League                 0x0000000104093b48 main + 76 (main.m:16)
13  libdyld.dylib                   0x00000001950511ec start + 4

d


Solution

  • What this crash log tells me is that the app is loading a NIB that includes a UISearchDisplayController when it throws an exception. UISearchDisplayController is deprecated, and should be replaced with a UISearchController. The first thing I'd try is making that replacement.