iOS App Crash On PushViewController, but only in TestFlight - ios

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

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.

Related

iOS app crashed with error UISearchDisplayControllerNoLongerSupported

I have uploaded an iOS app on the app store. The development build is working perfectly fine and there was no error while debugging the same app in Xcode.
But when the app is live on the app store and the user installs the app from AppStore then the app crashes on tap on the search button.
Below is a screenshot of the crash log:
Launch Time: 2020-04-25 21:51:43.9128 +0530
OS Version: iPhone OS 13.3.1 (17D50)
Release Type: User
Baseband Version: 1.04.06
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x1aa46896c __exceptionPreprocess + 224
1 libobjc.A.dylib 0x1aa181028 objc_exception_throw + 59
2 CoreFoundation 0x1aa35814c +[NSException raise:format:] + 111
3 UIKitCore 0x1aded63f4 UISearchDisplayControllerNoLongerSupported + 215
4 UIKitCore 0x1aded66dc -[UISearchDisplayController initWithCoder:] + 87
5 UIFoundation 0x1adab024c UINibDecoderDecodeObjectForValue + 731
6 UIFoundation 0x1adab0480 UINibDecoderDecodeObjectForValue + 1295
7 UIFoundation 0x1ada4b00c -[UINibDecoder decodeObjectForKey:] + 319
8 UIKitCore 0x1adf1f73c -[UIViewController initWithCoder:] + 1039
9 Rmag.eu 0x102a1b420 0x102954000 + 816160
10 Rmag.eu 0x102a14eb0 0x102954000 + 790192
11 Rmag.eu 0x1029d8908 0x102954000 + 542984
12 Rmag.eu 0x1029d8638 0x102954000 + 542264
13 UIKitCore 0x1ae1f1818 -[UIClassSwapper initWithCoder:] + 2363
14 UIFoundation 0x1adab024c UINibDecoderDecodeObjectForValue + 731
15 UIFoundation 0x1ada4b00c -[UINibDecoder decodeObjectForKey:] + 319
16 UIKitCore 0x1ae1f59c4 -[UIRuntimeConnection initWithCoder:] + 131
17 UIFoundation 0x1adab024c UINibDecoderDecodeObjectForValue + 731
18 UIFoundation 0x1adab0480 UINibDecoderDecodeObjectForValue + 1295
19 UIFoundation 0x1ada4b00c -[UINibDecoder decodeObjectForKey:] + 319
20 UIKitCore 0x1ae1f08f0 -[NSCoder+ 7121136 (UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:forKey:] + 491
21 UIKitCore 0x1ae1f3528 -[UINib instantiateWithOwner:options:] + 1115
22 UIKitCore 0x1ae6c5cb0 -[UIStoryboard __reallyInstantiateViewControllerWithIdentifier:creator:storyboardSegueTemplate:sender:] + 291
23 Rmag.eu 0x102a1a320 0x102954000 + 811808
24 Rmag.eu 0x102a13d2c 0x102954000 + 785708
25 libobjc.A.dylib 0x1aa17ccc8 -[NSObject performSelector:withObject:withObject:] + 75
26 UIKitCore 0x1ae56a918 -[UIApplication sendAction:to:from:forEvent:] + 99
27 UIKitCore 0x1adf79380 -[UIControl sendAction:to:forEvent:] + 207
28 UIKitCore 0x1adf796f4 -[UIControl _sendActionsForEvents:withEvent:] + 411
29 UIKitCore 0x1adf78704 -[UIControl touchesEnded:withEvent:] + 523
30 UIKitCore 0x1ae5a578c -[UIWindow _sendTouchesForEvent:] + 2083
31 UIKitCore 0x1ae5a6a7c -[UIWindow sendEvent:] + 3335
32 UIKitCore 0x1ae582600 -[UIApplication sendEvent:] + 347
33 UIKitCore 0x1ae5fca58 __dispatchPreprocessedEventFromEventQueue + 5711
34 UIKitCore 0x1ae5ff010 __handleEventQueueInternal + 4927
35 UIKitCore 0x1ae5f8194 __handleHIDEventFetcherDrain + 111
36 CoreFoundation 0x1aa3e4108 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 27
37 CoreFoundation 0x1aa3e405c __CFRunLoopDoSource0 + 83
38 CoreFoundation 0x1aa3e37c8 __CFRunLoopDoSources0 + 183
39 CoreFoundation 0x1aa3de694 __CFRunLoopRun + 1067
40 CoreFoundation 0x1aa3ddf40 CFRunLoopRunSpecific + 479
41 GraphicsServices 0x1b466e534 GSEventRunModal + 107
42 UIKitCore 0x1ae569580 UIApplicationMain + 1939
43 Rmag.eu 0x102972a9c 0x102954000 + 125596
44 libdyld.dylib 0x1aa25ce18 start + 3
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001aa252efc __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001aa1728b8 pthread_kill + 228
2 libsystem_c.dylib 0x00000001aa102af4 __abort + 116
3 libsystem_c.dylib 0x00000001aa102a80 __abort + 0
4 libc++abi.dylib 0x00000001aa21a3c8 __cxa_bad_cast + 0
5 libc++abi.dylib 0x00000001aa21a5c0 demangling_unexpected_handler+ 5568 () + 0
6 libobjc.A.dylib 0x00000001aa181308 _objc_terminate+ 25352 () + 124
7 Rmag.eu 0x0000000102e95040 0x102954000 + 5509184
8 libc++abi.dylib 0x00000001aa227634 std::__terminate(void (*)+ 58932 ()) + 20
9 libc++abi.dylib 0x00000001aa2271ec __cxa_rethrow + 148
10 libobjc.A.dylib 0x00000001aa1811ec objc_exception_rethrow + 44
11 CoreFoundation 0x00000001aa3ddfb0 CFRunLoopRunSpecific + 592
12 GraphicsServices 0x00000001b466e534 GSEventRunModal + 108
13 UIKitCore 0x00000001ae569580 UIApplicationMain + 1940
14 Rmag.eu 0x0000000102972a9c 0x102954000 + 125596
15 libdyld.dylib 0x00000001aa25ce18 start + 4
According to me the app crashed because of error "UISearchDisplayControllerNoLongerSupported". But I am not using "UISearchDisplayController" anywhere in my app.
Below is a screenshot of the code
class SearchBarViewController: BaseViewController, UISearchBarDelegate{
var customTabBarView: CustomTabBar?
#IBOutlet weak var searchBar: UISearchBar!
var navController: UINavigationController?
Please help me to resolve the issue or how can I find the error in the code of the app.
Creating a new SearchBarViewController resolved the issue.
We have to remove the older SearchVar UIViewController from code.

IOS iPhone app crash with [NSObject(NSObject) doesNotRecognizeSelector:] and _objc_msgSend_uncached

Here is the crash report not sure why
Incident Identifier: 8F69B0C7-F57D-40C7-B8E7-7A846EDCFE2E
CrashReporter Key: e18182a2b39e52acee70b63eb8a627bf2e6392ec
Hardware Model: iPad2,2
Process: androppo [1105]
Path: /private/var/mobile/Containers/Bundle/Application/EA41AE7C-D8E6-49E3-B124-6FDA7F51A4BD/androppo.app/androppo
Identifier: buzoo.jp.roppow
Version: 1.1 (1.1)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2014-10-22 12:36:38.195 +0700
Launch Time: 2014-10-22 12:36:37.387 +0700
OS Version: iOS 8.1 (12B410)
Report Version: 105
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Last Exception Backtrace:
0 CoreFoundation 0x25d69d62 __exceptionPreprocess + 122
1 libobjc.A.dylib 0x33949c72 objc_exception_throw + 34
2 CoreFoundation 0x25d6f144 +[NSObject(NSObject) doesNotRecognizeSelector:] + 184
3 CoreFoundation 0x25d6d104 ___forwarding___ + 708
4 CoreFoundation 0x25c9e934 _CF_forwarding_prep_0 + 20
5 androppo 0x000def1c -[GADStatisticDictionary decrementNumberForKey:shouldNotifyDelegate:] + 68
6 androppo 0x000d3f30 -[GADApplication init] + 588
7 androppo 0x000d3cb8 __35+[GADApplication sharedApplication]_block_invoke + 40
8 libdispatch.dylib 0x33eaa40a _dispatch_client_callout + 18
9 libdispatch.dylib 0x33eb79e2 dispatch_once_f$VARIANT$mp + 58
10 androppo 0x000d3c88 +[GADApplication sharedApplication] + 148
11 androppo 0x000cf810 +[GADSlot initialize] + 72
12 libobjc.A.dylib 0x3394a4c0 _class_initialize + 532
13 libobjc.A.dylib 0x33950042 lookUpImpOrForward + 250
14 libobjc.A.dylib 0x3394ff3a _class_lookupMethodAndLoadCache3 + 30
15 libobjc.A.dylib 0x339561f4 _objc_msgSend_uncached + 20
16 androppo 0x000cd760 -[GADBannerView commonInitWithAdSize:] + 56
17 androppo 0x000cd9e0 -[GADBannerView initWithFrame:adSize:] + 164
18 androppo 0x000cdbbc -[GADBannerView initWithAdSize:] + 108
19 androppo 0x0007a9d8 -[MainPageVC addBannerOfAdmob] (MainPageVC.m:810)
20 androppo 0x00075bda -[MainPageVC viewDidLoad] (MainPageVC.m:105)
21 UIKit 0x2920e700 -[UIViewController loadViewIfRequired] + 596
22 UIKit 0x292b85a0 -[UINavigationController _layoutViewController:] + 28
23 UIKit 0x292b84c8 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 224
24 UIKit 0x292b7a4c -[UINavigationController _startTransition:fromViewController:toViewController:] + 60
25 UIKit 0x292b7786 -[UINavigationController _startDeferredTransitionIfNeeded:] + 574
26 UIKit 0x292b74ec -[UINavigationController __viewWillLayoutSubviews] + 40
27 UIKit 0x292b7484 -[UILayoutContainerView layoutSubviews] + 180
28 UIKit 0x2920bc1a -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 510
29 QuartzCore 0x28c36f60 -[CALayer layoutSublayers] + 132
30 QuartzCore 0x28c3294c CA::Layer::layout_if_needed(CA::Transaction*) + 356
31 QuartzCore 0x28c327d4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 12
32 QuartzCore 0x28c321c2 CA::Context::commit_transaction(CA::Transaction*) + 218
33 QuartzCore 0x28c31fcc CA::Transaction::commit() + 320
34 UIKit 0x2946fa58 -[UIApplication _reportMainSceneUpdateFinished:] + 40
35 UIKit 0x294707f0 -[UIApplication _runWithMainScene:transitionContext:completion:] + 2496
36 UIKit 0x2947ac34 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 32
37 UIKit 0x2946ec26 -[UIApplication workspaceDidEndTransaction:] + 126
38 FrontBoardServices 0x2c4920dc __31-[FBSSerialQueue performAsync:]_block_invoke + 8
39 CoreFoundation 0x25d30608 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 8
40 CoreFoundation 0x25d2f8cc __CFRunLoopDoBlocks + 212
41 CoreFoundation 0x25d2e086 __CFRunLoopRun + 782
42 CoreFoundation 0x25c7b97c CFRunLoopRunSpecific + 472
43 CoreFoundation 0x25c7b78e CFRunLoopRunInMode + 102
44 UIKit 0x29272b82 -[UIApplication _run] + 554
45 UIKit 0x2926d97c UIApplicationMain + 1436
46 androppo 0x0007479a main (main.m:16)
47 androppo 0x000746ac start + 36
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x33faadfc __pthread_kill + 8
1 libsystem_pthread.dylib 0x3402ad0e pthread_kill + 58
2 libsystem_c.dylib 0x33f4a934 abort + 72
3 libc++abi.dylib 0x33156bb8 abort_message + 84
4 libc++abi.dylib 0x3317066a default_terminate_handler() + 262
5 libobjc.A.dylib 0x33949f0e _objc_terminate() + 190
6 libc++abi.dylib 0x3316ddec std::__terminate(void (*)()) + 76
7 libc++abi.dylib 0x3316d5ac __cxa_throw + 108
8 libobjc.A.dylib 0x33949d46 objc_exception_throw + 246
9 CoreFoundation 0x25d6f144 +[NSObject(NSObject) doesNotRecognizeSelector:] + 184
10 CoreFoundation 0x25d6d104 ___forwarding___ + 708
11 CoreFoundation 0x25c9e934 _CF_forwarding_prep_0 + 20
12 androppo 0x000def1c -[GADStatisticDictionary decrementNumberForKey:shouldNotifyDelegate:] + 68
13 androppo 0x000d3f30 -[GADApplication init] + 588
14 androppo 0x000d3cb8 __35+[GADApplication sharedApplication]_block_invoke + 40
15 libdispatch.dylib 0x33eaa40c _dispatch_client_callout + 20
16 libdispatch.dylib 0x33eb79e2 dispatch_once_f$VARIANT$mp + 58
17 androppo 0x000d3c88 +[GADApplication sharedApplication] + 148
18 androppo 0x000cf810 +[GADSlot initialize] + 72
19 libobjc.A.dylib 0x3394a4c0 _class_initialize + 532
20 libobjc.A.dylib 0x33950042 lookUpImpOrForward + 250
21 libobjc.A.dylib 0x3394ff3a _class_lookupMethodAndLoadCache3 + 30
22 libobjc.A.dylib 0x339561f6 _objc_msgSend_uncached + 22
23 androppo 0x000cd760 -[GADBannerView commonInitWithAdSize:] + 56
24 androppo 0x000cd9e0 -[GADBannerView initWithFrame:adSize:] + 164
25 androppo 0x000cdbbc -[GADBannerView initWithAdSize:] + 108
26 androppo 0x0007a9d8 -[MainPageVC addBannerOfAdmob] (MainPageVC.m:810)
27 androppo 0x00075bda -[MainPageVC viewDidLoad] (MainPageVC.m:105)
28 UIKit 0x2920e700 -[UIViewController loadViewIfRequired] + 596
29 UIKit 0x292b85a0 -[UINavigationController _layoutViewController:] + 28
30 UIKit 0x292b84c8 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 224
31 UIKit 0x292b7a4c -[UINavigationController _startTransition:fromViewController:toViewController:] + 60
32 UIKit 0x292b7786 -[UINavigationController _startDeferredTransitionIfNeeded:] + 574
33 UIKit 0x292b74ec -[UINavigationController __viewWillLayoutSubviews] + 40
34 UIKit 0x292b7484 -[UILayoutContainerView layoutSubviews] + 180
35 UIKit 0x2920bc1a -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 510
36 QuartzCore 0x28c36f60 -[CALayer layoutSublayers] + 132
37 QuartzCore 0x28c3294c CA::Layer::layout_if_needed(CA::Transaction*) + 356
38 QuartzCore 0x28c327d4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 12
39 QuartzCore 0x28c321c2 CA::Context::commit_transaction(CA::Transaction*) + 218
40 QuartzCore 0x28c31fcc CA::Transaction::commit() + 320
41 UIKit 0x2946fa58 -[UIApplication _reportMainSceneUpdateFinished:] + 40
42 UIKit 0x294707f0 -[UIApplication _runWithMainScene:transitionContext:completion:] + 2496
43 UIKit 0x2947ac34 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 32
44 UIKit 0x2946ec28 -[UIApplication workspaceDidEndTransaction:] + 128
45 FrontBoardServices 0x2c4920de __31-[FBSSerialQueue performAsync:]_block_invoke + 10
46 CoreFoundation 0x25d3060a __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 10
47 CoreFoundation 0x25d2f8cc __CFRunLoopDoBlocks + 212
48 CoreFoundation 0x25d2e086 __CFRunLoopRun + 782
49 CoreFoundation 0x25c7b97c CFRunLoopRunSpecific + 472
50 CoreFoundation 0x25c7b78e CFRunLoopRunInMode + 102
51 UIKit 0x29272b82 -[UIApplication _run] + 554
52 UIKit 0x2926d97c UIApplicationMain + 1436
53 androppo 0x0007479a main (main.m:16)
54 androppo 0x000746ac start + 36
This happened when I tried to run the app's .ipa through profile mode or window->devices, then drag the .ipa file to my device's app list. Yet It didn't happen if it ran in normal mode (cmd + r). I have no idea about the crash log and what caused the crash happened. Could someone help me out, I must fix the issues today and submit to Itunes Connect. I would really appreciate the help. Thanks.

Unable to find root cause of random crash on tabbar

I have a side panel view (like side drawer) in my iPad app which contains tabbar having 2 tabs. This view is beyond the ipad visible screen and become visible once we pull it from left side. This get initialize always on app launch. It crashes randomly on iOS 7.0.3 and 7.0.4 mostly on iPad 4 models. I can't reproduce it in debug mode while debugger is attached and reproducing frequency is 1% or less on release build.
It will not an iOS issue but any guess or anybody faced and solved similar problem?
Crash report:
Hardware Model: iPad3,4
Code Type: ARM (Native)
OS Version: iOS 7.0.4 (11B554a)
Crash report:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 12
Thread 0:
0 libsystem_kernel.dylib 0x38d7ebb4 syscall_thread_switch + 8
1 libsystem_platform.dylib 0x38df349c _os_lock_handoff_lock_slow + 48
2 libsystem_malloc.dylib 0x38db90f8 szone_free_definite_size + 328
3 libRIP.A.dylib 0x2e4ffb72 ripc_ReleaseClipState + 34
4 libRIP.A.dylib 0x2e503438 ripc_EndLayer + 80
5 CoreGraphics 0x2e1c25e8 CGContextEndTransparencyLayer + 36
6 UIKit 0x309e4d2a -[UIImage(TabBarItemImages) _tabBarItemImageWithTintColor:selected:metrics:style:forScreenScale:] + 902
7 UIKit 0x309e5070 -[UIImage(TabBarItemImages) _unselectedTabBarItemImageWithTintColor:metrics:style:forScreenScale:] + 36
8 UIKit 0x309e4748 -[UITabBarItem(Static) _updateImageWithTintColor:isSelected:getImageOffset:] + 552
9 UIKit 0x309e414c -[UITabBarItem(Static) _createViewForTabBar:showingBadge:withTint:idiom:] + 956
10 UIKit 0x309e3d82 -[UITabBarItem(Static) _createViewForTabBar:showingBadge:idiom:] + 34
11 UIKit 0x309e0028 -[UITabBarItem(Static) _updateViewForIdiom:positionItems:] + 156
12 UIKit 0x309e74ca -[UITabBar(Static) _configureItems:] + 402
13 UIKit 0x309e6b7e -[UITabBar(Static) _positionTabBarButtons:ignoringItem:] + 1270
14 UIKit 0x309e3b38 -[UITabBar setItems:animated:] + 1352
15 UIKit 0x309e3522 -[UITabBarController _rebuildTabBarItemsAnimated:] + 798
16 UIKit 0x309e7a74 -[UITabBarController _setSelectedViewController:] + 72
17 UIKit 0x308cdcf2 +[UIView(Animation) performWithoutAnimation:] + 70
18 UIKit 0x309eb470 -[UITabBarController _selectDefaultViewControllerIfNecessaryWithAppearanceTransitions:] + 216
19 UIKit 0x309ea8e6 -[UITabBarController viewWillAppear:] + 130
20 UIKit 0x308d66fa -[UIViewController _setViewAppearState:isAnimating:] + 342
21 CoreFoundation 0x2e080800 __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke + 48
22 CoreFoundation 0x2e07a21a -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 218
23 UIKit 0x308d6876 -[UIViewController _setViewAppearState:isAnimating:] + 722
24 UIKit 0x30a4ccfa -[UINavigationController _startCustomTransition:] + 842
25 UIKit 0x3096aa12 -[UINavigationController _startDeferredTransitionIfNeeded:] + 414
26 UIKit 0x3096a81c -[UINavigationController __viewWillLayoutSubviews] + 40
27 UIKit 0x3096a7b4 -[UILayoutContainerView layoutSubviews] + 180
28 UIKit 0x308bc34e -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 342
29 QuartzCore 0x3054293e -[CALayer layoutSublayers] + 138
30 QuartzCore 0x3053e162 CA::Layer::layout_if_needed(CA::Transaction*) + 346
31 QuartzCore 0x3053dff4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 12
32 QuartzCore 0x3053da08 CA::Context::commit_transaction(CA::Transaction*) + 224
33 QuartzCore 0x3053d81a CA::Transaction::commit() + 310
34 QuartzCore 0x30537548 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 52
35 CoreFoundation 0x2e102f66 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18
36 CoreFoundation 0x2e1008f2 __CFRunLoopDoObservers + 282
37 CoreFoundation 0x2e100c3e __CFRunLoopRun + 734
38 CoreFoundation 0x2e06b46c CFRunLoopRunSpecific + 520
39 CoreFoundation 0x2e06b24e CFRunLoopRunInMode + 102
40 GraphicsServices 0x32d722e6 GSEventRunModal + 134
41 UIKit 0x30920840 UIApplicationMain + 1132
42 MyApp 0x0006b5f2 0x64000 + 30194
43 libdyld.dylib 0x38cdaab4 start + 0
Thread 12 Crashed:
0 libsystem_kernel.dylib 0x38d911fc __pthread_kill + 8
1 libsystem_pthread.dylib 0x38df8a4e pthread_kill + 54
2 libsystem_c.dylib 0x38d42082 __abort + 74
3 libsystem_c.dylib 0x38d42034 abort + 84
4 libsystem_malloc.dylib 0x38dbf758 szone_error + 312
5 libsystem_malloc.dylib 0x38dbf9d4 free_list_checksum_botch + 24
6 libsystem_malloc.dylib 0x38dba1a4 tiny_free_list_remove_ptr + 76
7 libsystem_malloc.dylib 0x38db9770 szone_free_definite_size + 1984
8 libsystem_blocks.dylib 0x38cf7ac2 _Block_release + 214
9 libdispatch.dylib 0x38ccae76 _dispatch_queue_drain + 370
10 libdispatch.dylib 0x38cc7f8e _dispatch_queue_invoke + 38
11 libdispatch.dylib 0x38ccb742 _dispatch_root_queue_drain + 74
12 libdispatch.dylib 0x38ccb9c0 _dispatch_worker_thread2 + 52
13 libsystem_pthread.dylib 0x38df5dfc _pthread_wqthread + 296
14 libsystem_pthread.dylib 0x38df5cc0 start_wqthread + 4
Another random crash in similar case:
Thread 0 Crashed:
0 CoreFoundation 0x311e9728 -[__NSDictionaryM objectForKey:] + 100
1 UIKit 0x33a3e855 -[UILabel _setFont:] + 209
2 UIKit 0x33b5a411 -[UITabBarButton initWithImage:selectedImage:label:withInsets:] + 293
3 UIKit 0x33b59223 -[UITabBarItem(Static) _createViewForTabBar:showingBadge:withTint:idiom:] + 1171
4 UIKit 0x33b58d87 -[UITabBarItem(Static) _createViewForTabBar:showingBadge:idiom:] + 39
5 UIKit 0x33b5502d -[UITabBarItem(Static) _updateViewForIdiom:positionItems:] + 161
6 UIKit 0x33b5c4cf -[UITabBar(Static) _configureItems:] + 407
7 UIKit 0x33b5bb83 -[UITabBar(Static) _positionTabBarButtons:ignoringItem:] + 1275
8 UIKit 0x33b58b3d -[UITabBar setItems:animated:] + 1357
9 UIKit 0x33b58527 -[UITabBarController _rebuildTabBarItemsAnimated:] + 803
10 UIKit 0x33b5ca79 -[UITabBarController _setSelectedViewController:] + 77
11 UIKit 0x33a42cf5 +[UIView(Animation) performWithoutAnimation:] + 73
12 UIKit 0x33b60475 -[UITabBarController _selectDefaultViewControllerIfNecessaryWithAppearanceTransitions:] + 221
13 UIKit 0x33b5f8eb -[UITabBarController viewWillAppear:] + 135
14 UIKit 0x33a4b6ff -[UIViewController _setViewAppearState:isAnimating:] + 347
15 CoreFoundation 0x311f5803 __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke + 51
16 CoreFoundation 0x311ef21d -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 221
17 UIKit 0x33a4b87b -[UIViewController _setViewAppearState:isAnimating:] + 727
18 UIKit 0x33bc1cff -[UINavigationController _startCustomTransition:] + 847
19 UIKit 0x33adfa17 -[UINavigationController _startDeferredTransitionIfNeeded:] + 419
20 UIKit 0x33adf821 -[UINavigationController __viewWillLayoutSubviews] + 45
21 UIKit 0x33adf7b9 -[UILayoutContainerView layoutSubviews] + 185
22 UIKit 0x33a31353 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 347
23 QuartzCore 0x336b7943 -[CALayer layoutSublayers] + 143
24 QuartzCore 0x336b3167 CA::Layer::layout_if_needed(CA::Transaction*) + 351
25 QuartzCore 0x336b2ff9 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 17
26 QuartzCore 0x336b2a0d CA::Context::commit_transaction(CA::Transaction*) + 229
27 QuartzCore 0x336b281f CA::Transaction::commit() + 315
28 QuartzCore 0x336ac54d CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 57
29 CoreFoundation 0x31277f69 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 21
30 CoreFoundation 0x312758f7 __CFRunLoopDoObservers + 287
31 CoreFoundation 0x31275c43 __CFRunLoopRun + 739
32 CoreFoundation 0x311e0471 CFRunLoopRunSpecific + 525
33 CoreFoundation 0x311e0253 CFRunLoopRunInMode + 107
34 GraphicsServices 0x35ee12eb GSEventRunModal + 139
35 UIKit 0x33a95845 UIApplicationMain + 1137
36 SofTestM 0x000545f7 0x4d000 + 30199
The second crash is at time of setting font at
UITabBar-->UITabBarButton->UILabel (of UITabBarButton) _setFont:
I feel this random crashes might be due to memory leaks in your application.Pardon me if i am wrong.
In your logs it is seen that you use CoreGraphics.Releasing Core Graphics( even if you have ARC) is a bit tricky as it is not 100% memory leaf proof .That is it at times takes a while to get released.
So suppose you are using core graphic objects whithin a loop then it is certain that your ipad memory will go out of bounds.

Crash log is not completely symbolicated

I am able to symbolicate my crash logs in xcode 4.5 EXCEPT for the last line. Specifically line 29 of the 'Last Exception Backtrace' and line 15 in the 'Thread 0' area in the crash log doesn't show the object or method call when all the other lines do. My code is CoachMe1.
Any ideas as to why this would be ?
Here is the Symbolicated code:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x3165929e __exceptionPreprocess + 158
1 libobjc.A.dylib 0x355af97a objc_exception_throw + 26
2 CoreFoundation 0x316591c0 +[NSException raise:format:] + 100
3 Foundation 0x34a9ece2 -[NSKeyedUnarchiver initForReadingWithData:] + 2402
4 CoachMe1 0x000047b6 -[CoachMe1ViewController viewWillAppear:] (CoachMe1ViewController.m:322)
5 UIKit 0x32b7531c -[UIViewController _setViewAppearState:isAnimating:] + 132
6 UIKit 0x32b817a0 -[UINavigationController _startTransition:fromViewController:toViewController:] + 536
7 UIKit 0x32b814ac -[UINavigationController _startDeferredTransitionIfNeeded:] + 320
8 UIKit 0x32b6fb8e -[UINavigationController pushViewController:transition:forceImmediate:] + 854
9 UIKit 0x32b6f82e -[UINavigationController pushViewController:animated:] + 34
10 CoachMe1 0x000183da -[FrontPageViewController loadGameDashboard] (FrontPageViewController.m:38)
11 UIKit 0x32bf90a8 -[UIApplication sendAction:to:from:forEvent:] + 68
12 UIKit 0x32bf905a -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 26
13 UIKit 0x32bf9038 -[UIControl sendAction:to:forEvent:] + 40
14 UIKit 0x32bf88ee -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 498
15 UIKit 0x32bf8de4 -[UIControl touchesEnded:withEvent:] + 484
16 UIKit 0x32b215f4 -[UIWindow _sendTouchesForEvent:] + 520
17 UIKit 0x32b0e804 -[UIApplication sendEvent:] + 376
18 UIKit 0x32b0e11e _UIApplicationHandleEvent + 6150
19 GraphicsServices 0x3085459e _PurpleEventCallback + 586
20 GraphicsServices 0x308541ce PurpleEventCallback + 30
21 CoreFoundation 0x3162e16e __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 30
22 CoreFoundation 0x3162e112 __CFRunLoopDoSource1 + 134
23 CoreFoundation 0x3162cf94 __CFRunLoopRun + 1380
24 CoreFoundation 0x3159feb8 CFRunLoopRunSpecific + 352
25 CoreFoundation 0x3159fd44 CFRunLoopRunInMode + 100
26 GraphicsServices 0x308532e6 GSEventRunModal + 70
27 UIKit 0x32b622fc UIApplicationMain + 1116
28 CoachMe1 0x0000257e main (main.m:14)
29 CoachMe1 0x00002538 0x1000 + 5432
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3934f350 __pthread_kill + 8
1 libsystem_c.dylib 0x33cb111e pthread_kill + 54
2 libsystem_c.dylib 0x33ced96e abort + 90
3 libc++abi.dylib 0x30803d4a abort_message + 70
4 libc++abi.dylib 0x30800ff4 _ZL17default_terminatev + 20
5 libobjc.A.dylib 0x355afa74 _ZL15_objc_terminatev + 144
6 libc++abi.dylib 0x30801078 _ZL19safe_handler_callerPFvvE + 76
7 libc++abi.dylib 0x30801110 std::terminate() + 16
8 libc++abi.dylib 0x30802594 __cxa_rethrow + 84
9 libobjc.A.dylib 0x355af9cc objc_exception_rethrow + 8
10 CoreFoundation 0x3159ff1c CFRunLoopRunSpecific + 452
11 CoreFoundation 0x3159fd44 CFRunLoopRunInMode + 100
12 GraphicsServices 0x308532e6 GSEventRunModal + 70
13 UIKit 0x32b622fc UIApplicationMain + 1116
14 CoachMe1 0x0000257e main (main.m:14)
15 CoachMe1 0x00002538 0x1000 + 5432
Your app is crashing in loadGameDashboard function in FrontPageViewController.m class line 38.
Please check this function with a break point . you see where your app is crashing....

Strange iOS tableView/CALayer crashes

My app started crashing after long time in background right when I launch it again.
The problem of course is when it wasn't killed - only when it was in the background.
the log is:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x32858a1c __pthread_kill + 8
1 libsystem_c.dylib 0x337013b4 pthread_kill + 52
2 libsystem_c.dylib 0x336f9bf8 abort + 72
3 libstdc++.6.dylib 0x30504a64 __gnu_cxx::__verbose_terminate_handler() + 376
4 libobjc.A.dylib 0x3068f06c _objc_terminate + 104
5 libstdc++.6.dylib 0x30502e36 __cxxabiv1::__terminate(void (*)()) + 46
6 libstdc++.6.dylib 0x30502e8a std::terminate() + 10
7 libstdc++.6.dylib 0x30502f5a __cxa_throw + 78
8 libobjc.A.dylib 0x3068dc84 objc_exception_throw + 64
9 CoreFoundation 0x3351048a +[NSException raise:format:arguments:] + 62
10 Foundation 0x326ea56c -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 56
11 UIKit 0x31bc3a82 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 666
12 UIKit 0x31bc3764 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 28
13 UIKit 0x31bbc0c6 -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 930
14 UIKit 0x31bbb276 -[UITableView layoutSubviews] + 134
15 UIKit 0x31b675f4 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 20
16 CoreFoundation 0x3347defc -[NSObject(NSObject) performSelector:withObject:] + 16
17 QuartzCore 0x33351bae -[CALayer layoutSublayers] + 114
18 QuartzCore 0x33351966 CALayerLayoutIfNeeded + 178
19 QuartzCore 0x333571be CA::Context::commit_transaction(CA::Transaction*) + 206
20 QuartzCore 0x33356fd0 CA::Transaction::commit() + 184
21 QuartzCore 0x3335004e CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 50
22 CoreFoundation 0x334e7a2e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 10
23 CoreFoundation 0x334e945e __CFRunLoopDoObservers + 406
24 CoreFoundation 0x334ea754 __CFRunLoopRun + 848
25 CoreFoundation 0x3347aebc CFRunLoopRunSpecific + 224
26 CoreFoundation 0x3347adc4 CFRunLoopRunInMode + 52
27 GraphicsServices 0x311a5418 GSEventRunModal + 108
28 GraphicsServices 0x311a54c4 GSEventRun + 56
29 UIKit 0x31b90d62 -[UIApplication _run] + 398
30 UIKit 0x31b8e800 UIApplicationMain + 664
31 Vento 0x00002c64 main (main.m:14)
32 Vento 0x00002c0c start + 32
Any idea where to start digging?
Thank you!
Look at the log to see the exception detail.
Run the static code analyzer over your code. It may find the bug for you.

Resources