iOS 7.1 Crash: -[UINavigationBar setItems:animated:] - uinavigationbar

I'm experiencing a crash that is brand new across all iPhone devices with iOS 7.1 and I'm wondering if others have seen the same.
Date/Time: 2014-03-11 11:46:00.795 -0700
OS Version: iOS 7.1 (11D167)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 6
Last Exception Backtrace:
0 CoreFoundation 0x2d4dbefe __exceptionPreprocess + 126
1 libobjc.A.dylib 0x37c70ce2 objc_exception_throw + 32
2 CoreFoundation 0x2d4dbe40 +[NSException raise:format:] + 106
3 UIKit 0x2fe319a0 -[UINavigationBar setItems:animated:] + 98
4 Document 0x97aa6 -[FHHorizontalSplitViewController setVisibility:animated:] (FHHorizontalSplitViewController.m:233)
5 Document 0x98882 __44-[FHHorizontalSplitViewReplaceSegue perform]_block_invoke (FHHorizontalSplitViewController.m:450)
6 Document 0x9814a __72-[FHHorizontalSplitViewController _changeViewFramesAnimated:completion:]_block_invoke (FHHorizontalSplitViewController.m:335)
7 UIKit 0x2fd43788 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 278
8 UIKit 0x2fd433d2 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 172
9 UIKit 0x2fd432ea -[UIViewAnimationState animationDidStop:finished:] + 60
10 QuartzCore 0x2f98de06 CA::Layer::run_animation_callbacks(void*) + 228
11 libdispatch.dylib 0x38159d3a _dispatch_client_callout + 16
12 libdispatch.dylib 0x3815c6be _dispatch_main_queue_callback_4CF + 272
13 CoreFoundation 0x2d4a6674 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 2
14 CoreFoundation 0x2d4a4f40 __CFRunLoopRun + 1302
15 CoreFoundation 0x2d40f7a4 CFRunLoopRunSpecific + 518
16 CoreFoundation 0x2d40f586 CFRunLoopRunInMode + 100
17 GraphicsServices 0x3237c6ce GSEventRunModal + 132
18 UIKit 0x2fd6e88c UIApplicationMain + 1130
19 Document 0x80dbe main (main.m:12)
The code in question (FHHorizontalSplitViewController) is a custom UIViewController container that is installed in a UINavigationController. The gist is it's splits the top and bottom halves of the iPhone screen and selections in the top half expands or contracts the bottom half. When a child-view controller has been expanded to fill the screen, the container asks it for its UINavigationItem and sets the navigation bar item.
The interesting thing is this crash is new on iOS 7.1; it works fine on 6.x and 7.0.x.
Have others seen new crashes in this method call that didn't happen before?
The crashing call site:
UINavigationController *navVC = self.navigationController;
if (navVC) {
NSMutableArray *navigationItems = [NSMutableArray arrayWithArray:navVC.navigationBar.items;
NSInteger lastItem = [navigationItems count] - 1;
navigationItems[lastItem] = [self navigationItem];
[navVC.navigationBar setItems:navigationItems animated:YES];
}

Calling -[UINavigationBar setItem:animated:] on a navigation bar that is being managed by a UINavigationController is disallowed (and newly enforced) in iOS 7.1

Related

iOS Exception Backtrace - App entry not symbolicating

I have received the below exception backtrace from Apple for an app I had submitted to the app store. I have symbolicated the log but my app's entry has not symbolicated. Any idea what I can do to achieve that? Please see Entry # 14 below which provides more detail. Any help would be much appreciated
Last Exception Backtrace:
0 CoreFoundation 0x1810cadb0 __exceptionPreprocess + 124
1 libobjc.A.dylib 0x18072ff80 objc_exception_throw + 56
2 UIKit 0x186b6d268 -[UIPopoverPresentationController presentationTransitionWillBegin] + 2884
3 UIKit 0x186581fb0 __71-[UIPresentationController _initViewHierarchyForPresentationSuperview:]_block_invoke + 1640
4 UIKit 0x1865800c8 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 332
5 UIKit 0x1864d30c8 _runAfterCACommitDeferredBlocks + 292
6 UIKit 0x1864e0a80 _cleanUpAfterCAFlushAndRunDeferredBlocks + 92
7 UIKit 0x1862125a4 _afterCACommitHandler + 96
8 CoreFoundation 0x181080728 _CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
9 CoreFoundation 0x18107e4cc __CFRunLoopDoObservers + 372
10 CoreFoundation 0x18107e8fc __CFRunLoopRun + 928
11 CoreFoundation 0x180fa8c50 CFRunLoopRunSpecific + 384
12 GraphicsServices 0x182890088 GSEventRunModal + 180
13 UIKit 0x18628a088 UIApplicationMain + 204
14 MyApp 0x1000fb144 0x1000e4000 + 94532
15 libdyld.dylib 0x180b468b8 start + 4
Finally solved the problem. I was invoking UIAlertController in my code to present an action sheet with various options. To cater to devices that don't have a camera, I had added a conditional statement to directly present an ImagePicker instead of an action sheet.
iPAD testing was carried out only on the simulator which doesn't have a camera, thus directly invoking the ImagePicker. When he Conditional statement was removed, it tried presenting the Action Sheet through a PopoverPresentationController and crashed - as is evident in statement 2 of the Exception Backtrace.
I subsequently added the following code to fix the oversight:
if let popOver = optionMenu.popoverPresentationController {
popOver.sourceRect = sender.bounds
popOver.sourceView = sender
}

UIButton _setTitleFrozen crash

I have weird crash related to UIButton class. I have not found anything similar on SO yet. The log I get comes from Crashlytics so I also don't know which part of code is causing the issue. I put crash log below, may be some of you have already found out what is creating the problem.
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0xd1712d18
0 libobjc.A.dylib objc_msgSend + 5 _setTitleFrozen:
1 UIKit 32-[UIButton _beginTitleAnimation]_block_invoke853 + 28
2 UIKit -[UIViewAnimationBlockDelegate_didEndBlockAnimation:finished:context:] + 308
3 UIKit -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 184
4 UIKit -[UIViewAnimationState animationDidStop:finished:] + 70
5 QuartzCore CA::Layer::run_animation_callbacks(void*) + 234
6 libdispatch.dylib _dispatch_client_callout + 22
7 libdispatch.dylib _dispatch_main_queue_callback_4CF$VARIANT$mp + 712
8 CoreFoundation __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE_ + 8
9 CoreFoundation __CFRunLoopRun + 1512
10 CoreFoundation CFRunLoopRunSpecific + 476
11 CoreFoundation CFRunLoopRunInMode + 106
12 GraphicsServices GSEventRunModal + 136
13 UIKit UIApplicationMain + 1440
Changing the button type from System to Custom resolved this crash for me.
In my case this crash occurred because I was changing the button title right before removing it from the view hierarchy (by dismissing its parent view's VC) while the title change animation was still running.

Determine Cause of Crash

My app uses Parse. It puts all objects from class of 'Prayers' into a TableView. When it loads, it remembers all previously loaded items, searches for new ones. Starting today, it began crashing when a new item was added. My crash log looks like this, any thoughts?:
Date/Time: 2015-02-13 14:13:25.028 -0600
Launch Time: 2015-02-13 14:13:23.173 -0600
OS Version: iOS 8.1.3 (12B466)
Report Version: 105
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x185ce259c __exceptionPreprocess + 132
1 libobjc.A.dylib 0x1964340e4 objc_exception_throw + 60
2 CoreFoundation 0x185bc762c -[__NSArrayM objectAtIndex:] + 264
3 iPrayed 0x1000227a4 0x100014000 + 59300
4 UIKit 0x18a5a9b7c __66-[UISectionRowData refreshWithSection:tableView:tableViewRowData:]_block_invoke + 500
5 UIKit 0x18a56b9bc -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] + 3872
6 UIKit 0x18a56dc10 -[UITableViewRowData numberOfRows] + 112
7 UIKit 0x18a56db4c -[UITableView noteNumberOfRowsChanged] + 156
8 UIKit 0x18a56d498 -[UITableView reloadData] + 1304
9 iPrayed 0x100091730 0x100014000 + 513840
10 iPrayed 0x1000c9370 0x100014000 + 742256
11 libdispatch.dylib 0x196a793ac _dispatch_call_block_and_release + 24
12 libdispatch.dylib 0x196a7936c _dispatch_client_callout + 16
13 libdispatch.dylib 0x196a7d980 _dispatch_main_queue_callback_4CF + 932
14 CoreFoundation 0x185c99fa4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
15 CoreFoundation 0x185c9804c __CFRunLoopRun + 1492
16 CoreFoundation 0x185bc50a4 CFRunLoopRunSpecific + 396
17 GraphicsServices 0x18ed5f5a4 GSEventRunModal + 168
18 UIKit 0x18a4f6aa4 UIApplicationMain + 1488
19 iPrayed 0x1000515e4 0x100014000 + 251364
20 libdyld.dylib 0x196aa2a08 start + 4
These lines seem to indicate that your crash is caused by an attempt to access a non-existant index of your array:
1 libobjc.A.dylib 0x1964340e4 objc_exception_throw + 60
2 CoreFoundation 0x185bc762c -[__NSArrayM objectAtIndex:] + 264
If you want any further help, I'd recommend posting the content of your table view methods.

OS 8.1 Mobile Safari Crashes when adding options to a <select> element

I got the following crash report when trying to add options to a element using jQuery 1.11 and native javascript. Any ideas? Does anyone know anything about this crash?
Date/Time: 2014-11-26 11:45:28.852 -0600
Launch Time: 2014-11-26 11:40:10.181 -0600
OS Version: iOS 8.1 (12B410)
Report Version: 105
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x2bb3bc1a exceptionPreprocess + 122
1 libobjc.A.dylib 0x39720c86 objc_exception_throw + 34
2 CoreFoundation 0x2bb3bb60 +[NSException raise:format:] + 108
3 UIKit 0x2f2023a2 -[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:] + 442
4 UIKit 0x2f2021be -[UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] + 34
5 WebKit 0x2f979aaa -[WKSelectTableViewController viewWillAppear:] + 146
6 UIKit 0x2f010766 -[UIViewController setViewAppearState:isAnimating:] + 434
7 UIKit 0x2f2c6dc8 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 580
8 UIKit 0x2f074c48 _applyBlockToCFArrayCopiedToStack + 304
9 UIKit 0x2eff0aa6 _afterCACommitHandler + 454
10 CoreFoundation 0x2bb023b0 _CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 16
11 CoreFoundation 0x2baffa6e __CFRunLoopDoObservers + 274
12 CoreFoundation 0x2baffe76 __CFRunLoopRun + 910
13 CoreFoundation 0x2ba4e20c CFRunLoopRunSpecific + 472
14 CoreFoundation 0x2ba4e01e CFRunLoopRunInMode + 102
15 GraphicsServices 0x32e2d0a4 GSEventRunModal + 132
16 UIKit 0x2f05a1cc UIApplicationMain + 1436
17 MobileSafari 0x0007a944 0x72000 + 35140
18 libdyld.dylib 0x39ca0aaa tlv_initializer + 2
iPad, iOS 8.1

How do I debug this crash in UIDictationController?

Recently I am trying to debug with the information provided by Crash Reports. So far I have been able to identify and fix some bugs but not this one.
As I read from the crash report, it's something wrong with UIDictationController, but my code did not call UIDictationController at all. The crash report is generated by PLCrashReporter.
It seems that the user is using an iPad Mini (WiFi) and running iOS 6.0.2.
Incident Identifier: [REMOVED]
CrashReporter Key: [REMOVED]
Hardware Model: iPad2,5
Process: MyApp [2849]
Path: [REMOVED]
Identifier: com.yourcompany.MyApp
Version: 1.1
Code Type: ARM
Parent Process: launchd [1]
Date/Time: 2013-01-26 02:11:01 +0000
OS Version: iPhone OS 6.0.2 (10A550)
Report Version: 104
Exception Type: SIGABRT
Exception Codes: #0 at 0x32255350
Crashed Thread: 0
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
Last Exception Backtrace:
0 CoreFoundation 0x3882e2a3 __exceptionPreprocess + 163
1 libobjc.A.dylib 0x30d8897f objc_exception_throw + 31
2 CoreFoundation 0x387788d9 -[__NSArrayM insertObject:atIndex:] + 769
3 UIKit 0x36ad24c3 -[UIDictationMeterView initWithFrame:] + 267
4 UIKit 0x36abe699 -[UIDictationView initWithFrame:] + 281
5 UIKit 0x36abdcd1 +[UIDictationView sharedInstance] + 145
6 UIKit 0x36aae7f5 -[UIDictationController setState:] + 149
7 UIKit 0x36aaef5f -[UIDictationController setupForDictationStart] + 199
8 UIKit 0x36aae5d7 -[UIDictationController startConnectionForReason:] + 51
9 UIKit 0x36aaf173 -[UIDictationController startDictationFromLayout] + 55
10 UIKit 0x36825c09 -[UIKeyboardLayoutStar touchUp:] + 5249
11 UIKit 0x3682472f -[UIKeyboardLayout touchesEnded:withEvent:] + 387
12 UIKit 0x3670c5f1 -[UIWindow _sendTouchesForEvent:] + 525
13 UIKit 0x366f9801 -[UIApplication sendEvent:] + 381
14 UIKit 0x366f911b _UIApplicationHandleEvent + 6155
15 GraphicsServices 0x3771e5a3 _PurpleEventCallback + 591
16 GraphicsServices 0x3771e1d3 PurpleEventCallback + 35
17 CoreFoundation 0x38803173 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 35
18 CoreFoundation 0x38803117 __CFRunLoopDoSource1 + 139
19 CoreFoundation 0x38801f99 __CFRunLoopRun + 1385
20 CoreFoundation 0x38774ebd CFRunLoopRunSpecific + 357
21 CoreFoundation 0x38774d49 CFRunLoopRunInMode + 105
22 GraphicsServices 0x3771d2eb GSEventRunModal + 75
23 UIKit 0x3674d2f9 UIApplicationMain + 1121
24 MyApp 0x000032e1 main (main.m:36)
25 MyApp 0x00003230 start + 40
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x30f10350 __pthread_kill + 8
1 libsystem_c.dylib 0x304f8973 abort + 95
2 MyApp 0x000e954f uncaught_exception_handler + 27
3 CoreFoundation 0x3882e57f __handleUncaughtException + 615
4 libobjc.A.dylib 0x30d88a65 _objc_terminate() + 129
5 libc++abi.dylib 0x3719807b safe_handler_caller(void (*)()) + 79
6 libc++abi.dylib 0x37198114 std::terminate() + 20
7 libc++abi.dylib 0x37199599 __cxa_current_exception_type + 1
8 libobjc.A.dylib 0x30d889d1 objc_exception_rethrow + 13
9 CoreFoundation 0x38774f21 CFRunLoopRunSpecific + 457
10 CoreFoundation 0x38774d49 CFRunLoopRunInMode + 105
11 GraphicsServices 0x3771d2eb GSEventRunModal + 75
12 UIKit 0x3674d2f9 UIApplicationMain + 1121
13 MyApp 0x000032e1 main (main.m:36)
Is there any way that I can do with this bug? Or, at least mitigating the issue? Thanks in advance.
the problem is that somewhere in your app you have a keyboard come up and with iOS version 6.0.1 and 6.0.2, apple enabled the dictation controller even if you didn't specify it to be enabled. Two solutions to fixing it: create a custom keyboard without it or implement dictation in your app.
My suggestion is to just let it be, only affects two outdate iOS versions and hopefully the crashes will go away as the users upgrade their devices
I have the keyboard coming up for a custom TextView, and when the user pushed the dictation button, said something, pushed finish, and then they tried to dismiss the keyboard, there would be a crash. Possible this is also what you're experiencing?

Resources