Crash in presenting a view controller - ios

My application crashes while trying to present a view controller. It only seems to happen in the device but not in the simulator.
Also do I need to disable the breakpoints before archiving the build for TestFlight?
Here is the crash log:
Incident Identifier: E8E38296-EB9E-47FD-AC91-DC6231A32CE2
Beta Identifier: C0074033-1ABA-4888-9906-B0E709FDC0D5
Hardware Model: iPhone10,6
Process: Darb [6943]
Path: /private/var/containers/Bundle/Application/134E7292-FC58-4A08-9C73-E5B27C8BE5D2/Darb.app/Darb
Identifier: com.dot.Darb
Version: 7 (3.6.14)
Beta: YES
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.dot.Darb [2421]
Date/Time: 2018-07-23 10:51:48.2281 +0400
Launch Time: 2018-07-23 10:51:44.0025 +0400
OS Version: iPhone OS 11.2.6 (15D100)
Baseband Version: 1.03.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 0x183c2b164 __exceptionPreprocess + 124 (NSException.m:166)
1 libobjc.A.dylib 0x182e74528 objc_exception_throw + 56 (objc-exception.mm:521)
2 CoreFoundation 0x183c2ae2c -[NSException raise] + 12 (NSException.m:98)
3 Foundation 0x184542630 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 272 (NSKeyValueCoding.m:418)
4 UIKit 0x18d551134 -[UIViewController setValue:forKey:] + 104 (UIViewController.m:1275)
5 UIKit 0x18d779224 -[UIRuntimeOutletConnection connect] + 124 (UIRuntimeOutletConnection.m:17)
6 CoreFoundation 0x183b37d14 -[NSArray makeObjectsPerformSelector:] + 284 (NSArray.m:497)
7 UIKit 0x18d777c18 -[UINib instantiateWithOwner:options:] + 1696 (UINib.m:0)
8 UIKit 0x18d554be0 -[UIViewController _loadViewFromNibNamed:bundle:] + 372 (UIViewController.m:2866)
9 UIKit 0x18d3028e8 -[UIViewController loadView] + 176 (UIViewController.m:2995)
10 UIKit 0x18d1e56a8 -[UIViewController loadViewIfRequired] + 184 (UIViewController.m:3094)
11 UIKit 0x18d1e55d8 -[UIViewController view] + 28 (UIViewController.m:3155)
12 UIKit 0x18dd8ed24 -[_UIFullscreenPresentationController _setPresentedViewController:] + 92 (_UIFullscreenPresentationController.m:232)
13 UIKit 0x18d52da18 -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 140 (UIPresentationController.m:81)
14 UIKit 0x18d55e84c -[UIViewController _presentViewController:withAnimationController:completion:] + 2676 (UIViewController.m:7081)
15 UIKit 0x18d56188c __63-[UIViewController _presentViewController:animated:completion:]_block_invoke_2 + 68 (UIViewController.m:7543)
16 UIKit 0x18d1f392c +[UIView(Animation) performWithoutAnimation:] + 104 (UIView.m:11877)
17 UIKit 0x18d5617e0 __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 220 (UIViewController.m:7541)
18 UIKit 0x18d561ca0 -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 528 (UIViewController.m:7621)
19 UIKit 0x18d5616bc -[UIViewController _presentViewController:animated:completion:] + 188 (UIViewController.m:7552)
20 UIKit 0x18d2c32d0 -[UIViewController presentViewController:animated:completion:] + 160 (UIViewController.m:7565)
21 Darb 0x1025fdd7c MainViewController.viewDidLoad() + 5940 (MainViewController.swift:320)
22 Darb 0x1025ff3c0 #objc MainViewController.viewDidLoad() + 28 (MainViewController.swift:0)
23 UIKit 0x18d1e5a00 -[UIViewController loadViewIfRequired] + 1040 (UIViewController.m:3133)
24 UIKit 0x18d28ceb8 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 76 (UINavigationController.m:6345)
25 UIKit 0x18d28c358 -[UINavigationController _startTransition:fromViewController:toViewController:] + 196 (UINavigationController.m:6380)
26 UIKit 0x18d28bd5c -[UINavigationController _startDeferredTransitionIfNeeded:] + 1168 (UINavigationController.m:6601)
27 UIKit 0x18d28b7d8 -[UINavigationController __viewWillLayoutSubviews] + 164 (UINavigationController.m:6872)
28 UIKit 0x18d28b6d8 -[UILayoutContainerView layoutSubviews] + 188 (UILayoutContainerView.m:87)
29 UIKit 0x18d1e2e18 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1276 (UIView.m:15124)
30 QuartzCore 0x187c6f948 -[CALayer layoutSublayers] + 184 (CALayer.mm:9302)
31 QuartzCore 0x187c73ad0 CA::Layer::layout_if_needed(CA::Transaction*) + 332 (CALayer.mm:9182)
32 QuartzCore 0x187be031c CA::Context::commit_transaction(CA::Transaction*) + 336 (CALayer.mm:2416)
33 QuartzCore 0x187c07b40 CA::Transaction::commit() + 540 (CATransactionInternal.mm:425)
34 UIKit 0x18d45eb6c __34-[UIApplication _firstCommitBlock]_block_invoke_2 + 140 (UIApplication.m:9904)
35 CoreFoundation 0x183bd3590 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20 (CFRunLoop.c:1840)
36 CoreFoundation 0x183bd2e60 __CFRunLoopDoBlocks + 288 (CFRunLoop.c:1881)
37 CoreFoundation 0x183bd0b70 __CFRunLoopRun + 1068 (CFRunLoop.c:2922)
38 CoreFoundation 0x183af0c58 CFRunLoopRunSpecific + 436 (CFRunLoop.c:3245)
39 GraphicsServices 0x18599cf84 GSEventRunModal + 100 (GSEvent.c:2245)
40 UIKit 0x18d2495c4 UIApplicationMain + 236 (UIApplication.m:3956)
41 Darb 0x1025b1064 main + 56 (AppDelegate.swift:19)
42 libdyld.dylib 0x18361056c start + 4
Could some one please look into the logs and point me in the right direction?
following is the code which crash log points to
let lastLaunch = Foundation.UserDefaults.standard.double(forKey: "lastLaunch")
let lastLaunchDate = Date(timeIntervalSince1970: lastLaunch)
let lastLaunchIsToday = Calendar.current.isDateInToday(lastLaunchDate)
if !lastLaunchIsToday {
// Show the GIF
let zayedVC: ZayedVideoViewController = self.storyboard?.instantiateViewController(withIdentifier: "ZayedVC") as! ZayedVideoViewController
zayedVC.providesPresentationContextTransitionStyle = true
zayedVC.definesPresentationContext = true
zayedVC.isModalInPopover = true
zayedVC.modalPresentationStyle = .overFullScreen
self.navigationController?.present(zayedVC, animated: false, completion: nil)
}
Foundation.UserDefaults.standard.set(Date().timeIntervalSince1970, forKey: "lastLaunch")

Alright,
I have managed to solve the problem,the issue i had is the broken outlet connection.
I have removed it from the storyboard and it worked fine

Related

Decipher the iOS crashlog. The program crashes at layoutIfNeeded

I've got crash logs for my app from App Store. I'm not able to reproduce the crash and having a hard time deciphering it.
Following is the log -
Incident Identifier: AEF0FFDD-77E4-460F-97E4-B97A32EAE36D
CrashReporter Key: 78177aeeda1175c67f4467d02c023a2a165d1a01
Hardware Model: iPhone7,1
Process: Visits [4558]
Path: /private/var/containers/Bundle/Application/81AC75BC-433C-43E7-887D-8FC6BF5B5703/Visits.app/Visits
Identifier: com.x.y
Version: 1.1.1 (1.1.1)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.x.y [1143]
Date/Time: 2018-07-20 22:30:36.6608 +0530
Launch Time: 2018-07-20 22:30:35.9017 +0530
OS Version: iPhone OS 11.4.1 (15G77)
Baseband Version: 6.80.00
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 0x184136d8c __exceptionPreprocess + 228 (NSException.m:166)
1 libobjc.A.dylib 0x1832f05ec objc_exception_throw + 56 (objc-exception.mm:521)
2 CoreFoundation 0x1840cfd80 -[__NSSingleObjectArrayI objectAtIndex:] + 128 (NSSingleObjectArray.m:16)
3 UIKit 0x18e6b0aa8 -[UITableViewDataSource tableView:cellForRowAtIndexPath:] + 172 (UITableViewDataSource.m:170)
4 UIKit 0x18e3c90f4 -[UITableViewController tableView:cellForRowAtIndexPath:] + 68 (UITableViewController.m:441)
5 UIKit 0x18de130cc -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 668 (UITableView.m:13463)
6 UIKit 0x18de12d84 -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 80 (UITableView.m:13514)
7 UIKit 0x18de11aa0 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2280 (UITableView.m:2599)
8 UIKit 0x18de0d5ec -[UITableView layoutSubviews] + 140 (UITableView.m:8565)
9 UIKit 0x18dd4a6f4 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1420 (UIView.m:15239)
10 QuartzCore 0x1882bfe54 -[CALayer layoutSublayers] + 184 (CALayer.mm:9357)
11 QuartzCore 0x1882c3fe4 CA::Layer::layout_if_needed(CA::Transaction*) + 324 (CALayer.mm:9237)
12 UIKit 0x18dd62bf4 -[UIView(Hierarchy) layoutBelowIfNeeded] + 548 (UIView.m:10438)
13 Visits 0x1007a8300 MainViewController.initialSetupForScreen() + 804 (MainViewController.swift:217)
14 Visits 0x1007a7ea4 MainViewController.viewDidLoad() + 924 (MainViewController.swift:175)
15 Visits 0x1007a8838 #objc MainViewController.viewDidLoad() + 28
16 UIKit 0x18dd51e64 -[UIViewController loadViewIfRequired] + 1020 (UIViewController.m:3192)
17 UIKit 0x18dd51a50 -[UIViewController view] + 28 (UIViewController.m:3214)
18 UIKit 0x18dd42ce4 -[UIWindow addRootViewControllerViewIfPossible] + 136 (UIWindow.m:1358)
19 UIKit 0x18dd41b18 -[UIWindow _setHidden:forced:] + 272 (UIWindow.m:1455)
20 UIKit 0x18ddcf62c -[UIWindow makeKeyAndVisible] + 48 (UIWindow.m:4883)
21 UIKit 0x18dd45274 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3660 (UIApplication.m:2210)
22 UIKit 0x18dd125e0 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1680 (UIApplication.m:3491)
23 UIKit 0x18e342b1c __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 784 (_UICanvasLifecycleMonitor.m:175)
24 UIKit 0x18dd11dd0 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 160 (_UICanvas.m:591)
25 UIKit 0x18dd11c6c -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 240 (_UICanvasLifecycleMonitor.m:153)
26 UIKit 0x18dd10afc -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 724 (_UICanvasLifecycleMonitor.m:229)
27 UIKit 0x18e9a684c __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 296 (_UIApplicationCanvas.m:0)
28 UIKit 0x18dd101ec -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 432 (_UIApplicationCanvas.m:156)
29 UIKit 0x18e78bac8 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 220 (_UICanvasLifecycleSettingsDiffAction.m:211)
30 UIKit 0x18e8d9bf8 _performActionsWithDelayForTransitionContext + 112 (_UICanvasSettingsDiffAction.m:34)
31 UIKit 0x18dd0fc0c -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 248 (_UICanvasLifecycleSettingsDiffAction.m:182)
32 UIKit 0x18dd0f5a8 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 368 (_UICanvas.m:517)
33 UIKit 0x18dd0c5e0 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 540 (UIApplication.m:3109)
34 UIKit 0x18dd0c330 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 364 (UIApplicationSceneClientAgent.m:41)
35 FrontBoardServices 0x186938470 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 364 (FBSSceneImpl.m:460)
36 FrontBoardServices 0x186940d6c __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 224 (FBSWorkspace.m:606)
37 libdispatch.dylib 0x183a28a60 _dispatch_client_callout + 16 (object.m:507)
38 libdispatch.dylib 0x183a30170 _dispatch_block_invoke_direct$VARIANT$mp + 224 (queue.c:3018)
39 FrontBoardServices 0x18696c878 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36 (FBSSerialQueue.m:164)
40 FrontBoardServices 0x18696c51c -[FBSSerialQueue _performNext] + 404 (FBSSerialQueue.m:196)
41 FrontBoardServices 0x18696cab8 -[FBSSerialQueue _performNextFromRunLoopSource] + 56 (FBSSerialQueue.m:232)
42 CoreFoundation 0x1840df404 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 (CFRunLoop.c:1982)
43 CoreFoundation 0x1840dec2c __CFRunLoopDoSources0 + 276 (CFRunLoop.c:2017)
44 CoreFoundation 0x1840dc79c __CFRunLoopRun + 1204 (CFRunLoop.c:2920)
45 CoreFoundation 0x183ffcda8 CFRunLoopRunSpecific + 552 (CFRunLoop.c:3245)
46 GraphicsServices 0x185fe2020 GSEventRunModal + 100 (GSEvent.c:2245)
47 UIKit 0x18e01c758 UIApplicationMain + 236 (UIApplication.m:3965)
48 Visits 0x1007a589c main + 56 (Location+CoreDataClass.swift:15)
49 libdyld.dylib 0x183a8dfc0 start + 4
Thread 0 name:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000183bbd2e0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000183d5e288 pthread_kill$VARIANT$mp + 376 (pthread.c:1484)
2 libsystem_c.dylib 0x0000000183b2bd0c abort + 140 (abort.c:91)
3 libc++abi.dylib 0x00000001832c72c8 abort_message + 132 (abort_message.cpp:75)
4 libc++abi.dylib 0x00000001832c7470 default_terminate_handler() + 304 (cxa_default_handlers.cpp:68)
5 libobjc.A.dylib 0x00000001832f08d4 _objc_terminate() + 124 (objc-exception.mm:657)
6 libc++abi.dylib 0x00000001832e137c std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:66)
7 libc++abi.dylib 0x00000001832e1400 std::terminate() + 84 (cxa_handlers.cpp:97)
8 libdispatch.dylib 0x0000000183a28a74 _dispatch_client_callout + 36 (object.m:510)
9 libdispatch.dylib 0x0000000183a30170 _dispatch_block_invoke_direct$VARIANT$mp + 224 (queue.c:3018)
10 FrontBoardServices 0x000000018696c878 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36 (FBSSerialQueue.m:164)
11 FrontBoardServices 0x000000018696c51c -[FBSSerialQueue _performNext] + 404 (FBSSerialQueue.m:196)
12 FrontBoardServices 0x000000018696cab8 -[FBSSerialQueue _performNextFromRunLoopSource] + 56 (FBSSerialQueue.m:232)
13 CoreFoundation 0x00000001840df404 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 (CFRunLoop.c:1982)
14 CoreFoundation 0x00000001840dec2c __CFRunLoopDoSources0 + 276 (CFRunLoop.c:2017)
15 CoreFoundation 0x00000001840dc79c __CFRunLoopRun + 1204 (CFRunLoop.c:2920)
16 CoreFoundation 0x0000000183ffcda8 CFRunLoopRunSpecific + 552 (CFRunLoop.c:3245)
17 GraphicsServices 0x0000000185fe2020 GSEventRunModal + 100 (GSEvent.c:2245)
18 UIKit 0x000000018e01c758 UIApplicationMain + 236 (UIApplication.m:3965)
19 Visits 0x00000001007a589c main + 56 (Location+CoreDataClass.swift:15)
20 libdyld.dylib 0x0000000183a8dfc0 start + 4
Following is the code snippet where the program crashes. The crash happens at the self.view.layoutIfNeeded().
func initialSetupForScreen(){
let screenHeight = UIScreen.main.bounds.height
let statusBarHeight = UIApplication.shared.statusBarFrame.height
fullyOpenSheetTop = -(screenHeight - (statusBarHeight * 2))
partiallyOpenSheetTop = -((screenHeight * 0.50) - titleBarHeight)
closedSheetTop = -titleBarHeight
notVisibleSheetTop = 40 //(+40 for iphone X)
fullyOrPartiallyThreshold = (fullyOpenSheetTop + partiallyOpenSheetTop)/2
partiallyOrClosedThreshold = (partiallyOpenSheetTop + closedSheetTop)/2
// set primary & secondary sheet height //(+40 for iphone X) (-40 fixed for iphone X)
primarySheetViewHeightConstraint.constant = -fullyOpenSheetTop
secondarySheetViewHeightConstraint.constant = -fullyOpenSheetTop
// primary sheet is set to fully open state
primarySheetViewTopConstraint.constant = fullyOpenSheetTop
primarySheetCurrentState = .fullyOpen
// secondary sheet is set to not visible state
secondarySheetViewTopConstraint.constant = notVisibleSheetTop
secondarySheetCurrentState = .notVisible
// settings View move it out of screen
settingsViewTopConstraint.constant = notVisibleSheetTop
primarySheetController.configurePrimarySheetContentView()
self.view.layoutIfNeeded()
}
Earlier, I was calling this function inside my viewDidLoad. I thought it was too early to call layoutIfNeeded inside viewDidLoad. So I moved the function to viewWillAppear. However, the crashes still seem to be happening . What am I missing/overseeing?
The crash is happening across very few devices and I'm not able to reproduce it.

iOS App crashes when started in Release Mode, but not when in Debug Mode

When trying to launch my Application not using Xcode, the App crashes upon opening a specific ViewController. I've checked the Device Logs but I can't figure out what exactly caused the problem.
Incident Identifier: 20BC06E7-31B0-4C0D-B563-9D28FCE7A51D
CrashReporter Key: 17799fa3afc4ff5354281302e5f0d5909740c60b
Hardware Model: iPhone9,3
Process: Wizy [7883]
Path: /private/var/containers/Bundle/Application/8471B027-87B4-408C-802D-526BC2B73E8A/Wizy.app/Wizy
Identifier: Wizypay.Wizy
Version: 3 (1.0.1)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: Wizypay.Wizy [3810]
Date/Time: 2018-06-26 17:53:40.5443 +0200
Launch Time: 2018-06-26 17:53:37.7096 +0200
OS Version: iPhone OS 11.4 (15F79)
Baseband Version: 2.03.12
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Filtered syslog:
None found
Last Exception Backtrace:
0 CoreFoundation 0x1831aad8c __exceptionPreprocess + 228
1 libobjc.A.dylib 0x1823645ec objc_exception_throw + 55
2 CoreFoundation 0x1831aac6c +[NSException raise:format:] + 115
3 UIKit 0x18d58b5fc UINibDecoderDecodeObjectForValue + 371
4 UIKit 0x18d58b8b0 UINibDecoderDecodeObjectForValue + 1063
5 UIKit 0x18d58b470 -[UINibDecoder decodeObjectForKey:] + 311
6 UIKit 0x18d1e5be4 -[UIView initWithCoder:] + 647
7 UIKit 0x18d58b738 UINibDecoderDecodeObjectForValue + 687
8 UIKit 0x18d58b470 -[UINibDecoder decodeObjectForKey:] + 311
9 UIKit 0x18d429c94 -[UIRuntimeConnection initWithCoder:] + 187
10 UIKit 0x18d58b738 UINibDecoderDecodeObjectForValue + 687
11 UIKit 0x18d58b8b0 UINibDecoderDecodeObjectForValue + 1063
12 UIKit 0x18d58b470 -[UINibDecoder decodeObjectForKey:] + 311
13 UIKit 0x18d428fe4 -[UINib instantiateWithOwner:options:] + 1163
14 UIKit 0x18d25aaa8 -[UIViewController _loadViewFromNibNamed:bundle:] + 371
15 UIKit 0x18ce9e074 -[UIViewController loadView] + 175
16 UIKit 0x18cdc2b14 -[UIViewController loadViewIfRequired] + 171
17 UIKit 0x18cdc2a50 -[UIViewController view] + 27
18 UIKit 0x18d96c0f4 __67-[UIStoryboardEmbedSegueTemplate newDefaultPerformHandlerForSegue:]_block_invoke + 175
19 UIKit 0x18d742af4 -[UIStoryboardSegueTemplate _performWithDestinationViewController:sender:] + 291
20 UIKit 0x18d7429a0 -[UIStoryboardSegueTemplate _perform:] + 91
21 UIKit 0x18d742c6c -[UIStoryboardSegueTemplate perform:] + 159
22 UIKit 0x18cdc2cb4 -[UIViewController loadViewIfRequired] + 587
23 UIKit 0x18cdc2a50 -[UIViewController view] + 27
24 UIKit 0x18ce44620 -[UINavigationController preferredContentSize] + 167
25 UIKit 0x18d006f10 -[UIPresentationController preferredContentSizeDidChangeForChildContentContainer:] + 67
26 UIKit 0x18d23ede4 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 139
27 UIKit 0x18d19e884 _runAfterCACommitDeferredBlocks + 295
28 UIKit 0x18d194958 _cleanUpAfterCAFlushAndRunDeferredBlocks + 383
29 UIKit 0x18d07951c _afterCACommitHandler + 131
30 CoreFoundation 0x183152910 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 31
31 CoreFoundation 0x183150238 __CFRunLoopDoObservers + 411
32 CoreFoundation 0x183150884 __CFRunLoopRun + 1435
33 CoreFoundation 0x183070da8 CFRunLoopRunSpecific + 551
34 GraphicsServices 0x185055020 GSEventRunModal + 99
35 UIKit 0x18d08d758 UIApplicationMain + 235
36 Wizy 0x100a45d70 0x1009e4000 + 400752
37 libdyld.dylib 0x182b01fc0 start + 3
I tried changing the optimisation level in the build settings because someone suggested to do so, but no luck.
I hope someone can help me, I'm under time pressure!
Thanks in advance!

Crash in UIGestureRecognizer related to WebView

I have a random crash in Webview that happend a couple of times already.
(Test automation tools: Monkey)
It looks like it is related to UIWebView, but I have no clue what happened
- any help is appreciated The crash seems to be known.
Version: 1.0 (1.0)
Code Type: ARM-64 (Native)
Parent Process: debugserver [406]
Date/Time: 2015-08-07 20:33:59.099 +0800
Launch Time: 2015-08-07 20:13:10.956 +0800
OS Version: iOS 8.3 (12F70)
Report Version: 105
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000002e6beb8
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x00000001959d3bd0 objc_msgSend + 16
1 UIKit 0x0000000188ff77b0 -[UIWebDocumentView selectionRectsForRange:] + 44
2 UIKit 0x00000001890d03b0 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) distanceBetweenPoint:andRange:] + 88
3 UIKit 0x0000000188dddcf4 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) oneFingerTap:] + 3364
4 UIKit 0x0000000188dc30d8 _UIGestureRecognizerSendActions + 272
5 UIKit 0x0000000188c5c71c -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 576
6 UIKit 0x00000001890cd4f8 ___UIGestureRecognizerUpdate_block_invoke662 + 56
7 UIKit 0x0000000188c20480 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 288
8 UIKit 0x0000000188c1e82c _UIGestureRecognizerUpdate + 2500
9 UIKit 0x0000000188c5a894 -[UIWindow _sendGesturesForEvent:] + 1040
10 UIKit 0x0000000188c59f4c -[UIWindow sendEvent:] + 656
11 UIKit 0x0000000188c2d188 -[UIApplication sendEvent:] + 260
12 UIKit 0x0000000188ece320 _UIApplicationHandleEventFromQueueEvent + 15420
13 UIKit 0x0000000188c2b69c _UIApplicationHandleEventQueue + 1712
14 CoreFoundation 0x00000001841a423c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 20
15 CoreFoundation 0x00000001841a34e0 __CFRunLoopDoSources0 + 260
16 CoreFoundation 0x00000001841a1590 __CFRunLoopRun + 708
17 CoreFoundation 0x00000001840cd2d0 CFRunLoopRunSpecific + 392
18 GraphicsServices 0x000000018d8eb6f8 GSEventRunModal + 164
19 UIKit 0x0000000188c92fa8 UIApplicationMain + 1484
20 PxxSDK 0x000000010009f144 0x100088000 + 94532
21 libdyld.dylib 0x000000019603ea04 start + 0
code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2015-08-07 19:47:25.688 +0800
Launch Time: 2015-08-07 18:30:53.690 +0800
OS Version: iOS 8.3 (12F70)
Report Version: 105
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x1841ec2d8 __exceptionPreprocess + 132
1 libobjc.A.dylib 0x1959c00e4 objc_exception_throw + 60
2 CoreFoundation 0x1841f33a4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 220
3 CoreFoundation 0x1841f0154 ___forwarding___ + 928
4 CoreFoundation 0x1840f2ccc _CF_forwarding_prep_0 + 92
5 UIKit 0x188ff77b4 -[UIWebDocumentView selectionRectsForRange:] + 48
6 UIKit 0x1890d03b4 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) distanceBetweenPoint:andRange:] + 92
7 UIKit 0x188dddcf8 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) oneFingerTap:] + 3368
8 UIKit 0x188dc30dc _UIGestureRecognizerSendActions + 276
9 UIKit 0x188c5c720 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 580
10 UIKit 0x1890cd4fc ___UIGestureRecognizerUpdate_block_invoke662 + 60
11 UIKit 0x188c20484 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 292
12 UIKit 0x188c1e830 _UIGestureRecognizerUpdate + 2504
13 UIKit 0x188c5a898 -[UIWindow _sendGesturesForEvent:] + 1044
14 UIKit 0x188c59f50 -[UIWindow sendEvent:] + 660
15 UIKit 0x188c2d18c -[UIApplication sendEvent:] + 264
16 UIKit 0x188ece324 _UIApplicationHandleEventFromQueueEvent + 15424
17 UIKit 0x188c2b6a0 _UIApplicationHandleEventQueue + 1716
18 CoreFoundation 0x1841a4240 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
19 CoreFoundation 0x1841a34e4 __CFRunLoopDoSources0 + 264
20 CoreFoundation 0x1841a1594 __CFRunLoopRun + 712
21 CoreFoundation 0x1840cd2d4 CFRunLoopRunSpecific + 396
22 GraphicsServices 0x18d8eb6fc GSEventRunModal + 168
23 UIKit 0x188c92fac UIApplicationMain + 1488
24 PxxSDK 0x100107148 0x1000f0000 + 94536
25 libdyld.dylib 0x19603ea08 start + 4
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2015-08-07 18:30:15.419 +0800
Launch Time: 2015-08-07 18:10:52.612 +0800
OS Version: iOS 8.3 (12F70)
Report Version: 105
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000014da98b0
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x00000001959d3bd0 objc_msgSend + 16
1 UIKit 0x0000000188c6ae48 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) containerIsBrowserView] + 48
2 UIKit 0x0000000188c6add0 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) textDocument] + 44
3 UIKit 0x0000000188c6acd0 -[UITextSelectionView selection] + 48
4 UIKit 0x0000000188d5a6b8 -[UITextSelectionView inputViewDidChange] + 108
5 CoreFoundation 0x00000001841922c0 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 16
6 CoreFoundation 0x00000001840cf44c _CFXNotificationPost + 2056
7 Foundation 0x0000000184ffea7c -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
8 UIKit 0x000000018932bc8c -[UIInputWindowController postEndNotifications:withInfo:] + 160
9 UIKit 0x000000018932a390 -[UIInputWindowController performWithSafeTransitionFrames:] + 148
10 UIKit 0x000000018932dac0 __77-[UIInputWindowController moveFromPlacement:toPlacement:starting:completion:]_block_invoke644 + 460
11 UIKit 0x0000000188c64770 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 404
12 UIKit 0x0000000188c642d8 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 184
13 UIKit 0x0000000188c641e0 -[UIViewAnimationState animationDidStop:finished:] + 100
14 UIKit 0x000000018261bfec -[UIViewAnimationStateAccessibility animationDidStop:finished:] + 52
15 QuartzCore 0x000000018857968c CA::Layer::run_animation_callbacks(void*) + 292
16 libdispatch.dylib 0x0000000196011950 _dispatch_client_callout + 12
17 libdispatch.dylib 0x0000000196016208 _dispatch_main_queue_callback_4CF + 1604
18 CoreFoundation 0x00000001841a37f4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
19 CoreFoundation 0x00000001841a189c __CFRunLoopRun + 1488
20 CoreFoundation 0x00000001840cd2d0 CFRunLoopRunSpecific + 392
21 GraphicsServices 0x000000018d8eb6f8 GSEventRunModal + 164
22 UIKit 0x0000000188c92fa8 UIApplicationMain + 1484
23 PxxSDK 0x0000000100067144 0x100050000 + 94532
24 libdyld.dylib 0x000000019603ea04 start + 0

Strange crash when presenting view controller

I get a strange crash when presenting a modal view controller on iOS 7, it only happens on iPhone 5C I haven't been able to repro on the iPhone 5 or 5s. I've attached the crash log below, as well as the code that presents the view controller. I used the presenting view controller as the transitioning delegate to have a custom fade in effect. Please let me know if you need any more information about this.
Code to present:
PresentedViewController *vc = [[PresentedViewController alloc] init];
vc.transitioningDelegate = self;
vc.modalPresentationStyle = UIModalPresentationCustom;
[self presentViewController:vc animated:YES completion:nil];
Crash Log:
Incident Identifier: 161D4D3E-146F-4CC6-A13C-66BF6305942F
CrashReporter Key: DCFCE3DE-6815-4EA6-85A5-AD5006E34125
Hardware Model: iPhone5,3
Process: AppName [10236]
Path: /Users/USER/AppName.app/AppName
Identifier: com.appname
Version: 4
Code Type: ARM
Parent Process: launchd [1]
Date/Time: 2014-09-02T20:31:52Z
OS Version: iPhone OS 7.0.4 (11B554a)
Report Version: 104
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0xb006dbcc
Crashed Thread: 0
Application Specific Information:
Selector name found in current argument registers: isHeaderFlaggedFPO
Thread 0 Crashed:
0 libobjc.A.dylib 0x395c277a lookUpImpOrForward + 46
1 libobjc.A.dylib 0x395bb02b _class_lookupMethodAndLoadCache3 + 32
2 libobjc.A.dylib 0x395badf9 _objc_msgSend_uncached + 22
3 CoreUI 0x3339bd0d -[CUIStructuredThemeStore renditionWithKey:] + 1050
4 CoreUI 0x333a50af -[CUINamedImage _renditionForSpecificKey:] + 168
5 CoreUI 0x333a50fd -[CUINamedImage image] + 18
6 UIKit 0x31a02c01 -[_UIAssetManager imageNamed:scale:idiom:subtype:cachingOptions:] + 258
7 UIKit 0x31a02af7 -[_UIAssetManager imageNamed:scale:idiom:subtype:] + 36
8 UIKit 0x31a02acd -[_UIAssetManager imageNamed:idiom:subtype:] + 42
9 UIKit 0x31a02a9b -[_UIAssetManager imageNamed:idiom:] + 44
10 UIKit 0x31d47ab1 -[UIImageNibPlaceholder initWithCoder:] + 286
11 UIKit 0x31ddd1d9 UINibDecoderDecodeObjectForValue + 738
12 UIKit 0x31ddceef -[UINibDecoder decodeObjectForKey:] + 88
13 UIKit 0x31cb61db -[UIImageView initWithCoder:] + 88
14 UIKit 0x31ddd1d9 UINibDecoderDecodeObjectForValue + 738
15 UIKit 0x31ddd179 UINibDecoderDecodeObjectForValue + 642
16 UIKit 0x31ddceef -[UINibDecoder decodeObjectForKey:] + 88
17 UIKit 0x31c7996d -[UIView initWithCoder:] + 650
18 UIKit 0x31ddd1d9 UINibDecoderDecodeObjectForValue + 738
19 UIKit 0x31ddd179 UINibDecoderDecodeObjectForValue + 642
20 UIKit 0x31ddceef -[UINibDecoder decodeObjectForKey:] + 88
21 UIKit 0x31c7996d -[UIView initWithCoder:] + 650
22 UIKit 0x31ddd1d9 UINibDecoderDecodeObjectForValue + 738
23 UIKit 0x31ddceef -[UINibDecoder decodeObjectForKey:] + 88
24 UIKit 0x31d46c1f -[UIRuntimeConnection initWithCoder:] + 148
25 UIKit 0x31ddd1d9 UINibDecoderDecodeObjectForValue + 738
26 UIKit 0x31ddd179 UINibDecoderDecodeObjectForValue + 642
27 UIKit 0x31ddceef -[UINibDecoder decodeObjectForKey:] + 88
28 UIKit 0x31d463f5 -[UINib instantiateWithOwner:options:] + 886
29 UIKit 0x31ca80fb -[UIViewController _loadViewFromNibNamed:bundle:] + 232
30 UIKit 0x31b09b59 -[UIViewController loadView] + 90
31 UIKit 0x319eb79d -[UIViewController loadViewIfRequired] + 70
32 UIKit 0x319eb719 -[UIViewController view] + 22
33 UIKit 0x31a955cf -[UIViewController shouldAutorotate] + 24
34 UIKit 0x31ad1c97 -[UIViewController _preferredInterfaceOrientationForPresentationInWindow:fromInterfaceOrientation:] + 248
35 UIKit 0x31ad05c5 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:animation:] + 2058
36 UIKit 0x31acf631 -[UIViewController presentViewController:withTransition:completion:] + 4674
37 AppName 0x000c4b9d -[PresentingViewController storePurchaseSuccessWithType:andUser:] (PresentingViewController.m:221)
38 AppName 0x000c5179 __54-[PresentingViewController alertView:clickedButtonAtIndex:]_block_invoke (PresentingViewController.m:245)
39 AppName 0x00225687 -[RACSubscriber sendNext:] (RACSubscriber.m:73)
40 AppName 0x0020d447 -[RACPassthroughSubscriber sendNext:] (RACPassthroughSubscriber.m:74)
41 AppName 0x00225687 -[RACSubscriber sendNext:] (RACSubscriber.m:73)
42 AppName 0x0020eda1 __29-[RACReturnSignal subscribe:]_block_invoke (RACReturnSignal.m:85)
43 AppName 0x00225f15 -[RACSubscriptionScheduler schedule:] (RACSubscriptionScheduler.m:40)
44 AppName 0x0020ed37 -[RACReturnSignal subscribe:] (RACReturnSignal.m:84)
45 AppName 0x00220aa5 -[RACSignal(Subscription) subscribeNext:error:completed:] (RACSignal.m:302)
46 AppName 0x0021f2df __29-[RACSignal(RACStream) bind:]_block_invoke76 (RACSignal.m:139)
47 AppName 0x0021f521 __29-[RACSignal(RACStream) bind:]_block_invoke113 (RACSignal.m:165)
48 AppName 0x00225687 -[RACSubscriber sendNext:] (RACSubscriber.m:73)
49 AppName 0x0020d447 -[RACPassthroughSubscriber sendNext:] (RACPassthroughSubscriber.m:74)
50 AppName 0x0020d447 -[RACPassthroughSubscriber sendNext:] (RACPassthroughSubscriber.m:74)
51 AppName 0x00224ccd -[RACSubject enumerateSubscribersUsingBlock:] (RACSubject.m:85)
52 AppName 0x00224dad -[RACSubject sendNext:] (RACSubject.m:92)
53 AppName 0x0020e65d -[RACReplaySubject sendNext:] (RACReplaySubject.m:89)
54 AppName 0x0008fa3d __71-[AFURLConnectionOperation(RACSupport) rac_overrideHTTPCompletionBlock]_block_invoke (AFURLConnectionOperation+RACSupport.m:42)
55 libdispatch.dylib 0x39aa40c3 _dispatch_call_block_and_release + 8
56 libdispatch.dylib 0x39aa40af _dispatch_client_callout + 20
57 libdispatch.dylib 0x39aa69a9 _dispatch_main_queue_callback_4CF + 266
58 CoreFoundation 0x2f22d5b1 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 6
59 CoreFoundation 0x2f22be7d __CFRunLoopRun + 1306
60 CoreFoundation 0x2f196471 CFRunLoopRunSpecific + 522
61 CoreFoundation 0x2f196253 CFRunLoopRunInMode + 104
62 GraphicsServices 0x33ed02eb GSEventRunModal + 136
63 UIKit 0x31a4b845 UIApplicationMain + 1134
64 AppName 0x000ab367 main (main.m:16)
65 libdyld.dylib 0x39ab8ab7 start + 0

Random crash on setting UITabBarButton label attributed text (Tab Title)

I am not able to reproduce this crash but received this kind of crashes multiple times from production build. In my app tab bar is loaded from storyboard only and tab bar is always hidden all the time.
Does it's main cause is low memory? Any guess, how to solve or reproduce this kind of problems
Hardware Model: iPad2,4
OS Version: iPhone OS 7.0.4 (11B554a)
Report Version: 104
Exception Type: SIGABRT
Exception Codes: #0 at 0x393f71fc
Crashed Thread: 0
Application Specific Information:
*** Terminating app due to uncaught exception 'NSRangeException', reason: 'NSMutableRLEArray replaceObjectsInRange:withObject:length:: Out of bounds'
Last Exception Backtrace:
0 CoreFoundation 0x2e766f4b __exceptionPreprocess + 131
1 libobjc.A.dylib 0x38e386af objc_exception_throw + 38
2 CoreFoundation 0x2e766e8d +[NSException raise:format:] + 104
3 Foundation 0x2f089aff -[NSMutableRLEArray replaceObjectsInRange:withObject:length:] + 122
4 Foundation 0x2f088efb -[NSConcreteMutableAttributedString initWithString:attributes:] + 310
5 UIKit 0x30ee8ed7 -[NSAttributedString(UILabelAdditions) _ui_synthesizeAttributedSubstringFromRange:usingDefaultAttributes:] + 86
6 UIKit 0x30ee8c9f -[UILabel _synthesizedAttributedText] + 1010
7 UIKit 0x30ee8307 -[UILabel _textRectForBounds:limitedToNumberOfLines:includingShadow:] + 222
8 UIKit 0x30ee8213 -[UILabel textRectForBounds:limitedToNumberOfLines:] + 54
9 UIKit 0x30ee80fb -[UILabel _intrinsicSizeWithinSize:] + 162
10 UIKit 0x30ee8049 -[UILabel sizeThatFits:] + 32
11 UIKit 0x30ee7f37 -[UIView(Geometry) sizeToFit] + 126
12 UIKit 0x31002be1 -[UITabBarButton initWithImage:selectedImage:label:withInsets:] + 388
13 UIKit 0x31001a1f -[UITabBarItem(Static) _createViewForTabBar:showingBadge:withTint:idiom:] + 1170
14 UIKit 0x31001583 -[UITabBarItem(Static) _createViewForTabBar:showingBadge:idiom:] + 38
15 UIKit 0x30ffd859 -[UITabBarItem(Static) _updateViewForIdiom:positionItems:] + 160
16 UIKit 0x31004c43 -[UITabBar(Static) _configureItems:] + 406
17 UIKit 0x310042db -[UITabBar(Static) _positionTabBarButtons:ignoringItem:] + 1234
18 UIKit 0x3100133f -[UITabBar setItems:animated:] + 1358
19 UIKit 0x31000d29 -[UITabBarController _rebuildTabBarItemsAnimated:] + 800
20 UIKit 0x310051f9 -[UITabBarController _setSelectedViewController:] + 76
21 UIKit 0x30eeb6e5 +[UIView(Animation) performWithoutAnimation:] + 72
22 UIKit 0x31008bf7 -[UITabBarController _selectDefaultViewControllerIfNecessaryWithAppearanceTransitions:] + 218
23 UIKit 0x31008077 -[UITabBarController viewWillAppear:] + 134
24 UIKit 0x30ef40eb -[UIViewController _setViewAppearState:isAnimating:] + 346
25 CoreFoundation 0x2e6aff65 __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke + 52
26 CoreFoundation 0x2e6a994d -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 220
27 UIKit 0x30ef4265 -[UIViewController _setViewAppearState:isAnimating:] + 724
28 UIKit 0x3106a4bf -[UINavigationController _startCustomTransition:] + 846
29 UIKit 0x30f88273 -[UINavigationController _startDeferredTransitionIfNeeded:] + 418
30 UIKit 0x30f8807d -[UINavigationController __viewWillLayoutSubviews] + 44
31 UIKit 0x30f88015 -[UILayoutContainerView layoutSubviews] + 184
32 UIKit 0x30ed9da3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 346
33 QuartzCore 0x30b60c6b -[CALayer layoutSublayers] + 142
34 QuartzCore 0x30b5c47b CA::Layer::layout_if_needed(CA::Transaction*) + 350
35 QuartzCore 0x30b5c30d CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 16
36 QuartzCore 0x30b5bd1f CA::Context::commit_transaction(CA::Transaction*) + 230
37 QuartzCore 0x30b5bb2f CA::Transaction::commit() + 314
38 QuartzCore 0x30b5585d CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 56
39 CoreFoundation 0x2e7321cd __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
40 CoreFoundation 0x2e72fb71 __CFRunLoopDoObservers + 284
41 CoreFoundation 0x2e72feb3 __CFRunLoopRun + 730
42 CoreFoundation 0x2e69ac27 CFRunLoopRunSpecific + 522
43 CoreFoundation 0x2e69aa0b CFRunLoopRunInMode + 106
44 GraphicsServices 0x3336e283 GSEventRunModal + 138
45 UIKit 0x30f3e049 UIApplicationMain + 1136
46 MyApp main (in MyApp) (main.m:16)
47 libdyld.dylib 0x39340ab7 start + 2
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x393f71fc __pthread_kill + 8
1 libsystem_c.dylib 0x393a7ffd abort + 77
2 MyApp uncaught_exception_handler (in MyApp) + 27
3 CoreFoundation 0x2e76724f __handleUncaughtException + 579
4 libobjc.A.dylib 0x38e3890f _objc_terminate() + 175
5 libc++abi.dylib 0x386ed1c7 std::__terminate(void (*)()) + 79
6 libc++abi.dylib 0x386ecd2d __cxa_increment_exception_refcount + 1
7 libobjc.A.dylib 0x38e387f7 objc_exception_rethrow + 43
8 CoreFoundation 0x2e69ac9d CFRunLoopRunSpecific + 641
9 CoreFoundation 0x2e69aa0b CFRunLoopRunInMode + 106
10 GraphicsServices 0x3336e283 GSEventRunModal + 138
11 UIKit 0x30f3e049 UIApplicationMain + 1136
12 MyApp main (in MyApp) (main.m:16)
From you crash log, line 5
5 UIKit 0x30ee8ed7 -[NSAttributedString(UILabelAdditions) _ui_synthesizeAttributedSubstringFromRange:usingDefaultAttributes:] + 86
seems like you generate your attribute string based on
- (NSAttributedString *)attributedSubstringFromRange:(NSRange)aRange
Maybe set a break point at that code, and check if your string length is larger than or equal to the range.

Resources