iOS14-beta2 WKWebView crash on -[_UIFocusContainerGuideMapEntry setFocusContainmentFrame:] (in UIKitCore) - crash

Recently we received lots of WKWebView crash logs on the iOS14 beta2 system.
Here is the crash log:
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: 0x00000000 at 0xf7fff8018
Attempted to dereference garbage pointer 0xf7fff8018.
libobjc.A.dylib
__NO_DSYM_FILE__
2
UIKitCore
-[_UIFocusContainerGuideMapEntry setFocusContainmentFrame:] (in UIKitCore) + 16
3
UIKitCore
-[_UIFocusRegionMapEntry _mapEntriesByOccludingWithFrame:] (in UIKitCore) + 344
4
UIKitCore
-[_UIFocusRegionMapSnapshot .cxx_destruct] (in UIKitCore) + 96
5
UIKitCore
-[_UIFocusableRegionMapEntry description] (in UIKitCore) + 116
6
UIKitCore
-[_UIFocusableRegionMapEntry description] (in UIKitCore) + 228
7
UIKitCore
-[_UIFocusRegionMapSnapshot visualRepresentationWithMinimumArea:] (in UIKitCore) + 1844
8
UIKitCore
-[_UIFocusRegionMapSnapshot visualRepresentationWithMinimumArea:] (in UIKitCore) + 672
9
UIKitCore
-[_UIFocusRegionMapSnapshot _snapshotByFulfillingPromiseFocusRegionEntry:] (in UIKitCore) + 848
10
UIKitCore
-[_UIStateMachine(Legacy) setStaticTransitionFromState:withEvent:toState:] (in UIKitCore) + 128
11
UIKitCore
-[_UIEstimatedTouchRecord initWithLiveTouch:freezeTouch:contextID:] (in UIKitCore) + 4
12
UIKitCore
-[UIWebDocumentView(Interaction) deepestNodeAtViewportLocation:] (in UIKitCore) + 96
13
WebKit
-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask] (in WebKit) + 272
14
WebKit
bool IPC::MessageSender::send<Messages::WebPaymentCoordinator::DidAuthorizePayment>(Messages::WebPaymentCoordinator::DidAuthorizePayment const&, unsigned long long, WTF::OptionSet<IPC::SendOption>) (in WebKit) + 28
15
WebKit
-[WKContentView(WKInteractionPreview) _presentedViewControllerForPreviewItemController:] (in WebKit) + 1564
16
UIKitCore
-[UIBezierPath encodeWithCoder:] (in UIKitCore) + 140
17
UIKitCore
__21+[UIColor blackColor]_block_invoke (in UIKitCore) + 140
18
UIKitCore
-[UIDisplayP3Color initWithDisplayP3Red:green:blue:alpha:] (in UIKitCore) + 196
19
UIKitCore
-[UIDeviceRGBColor set] (in UIKitCore) + 48
20
UIKitCore
__83+[_UIAppearance _applyInvocationsTo:window:matchingSelector:onlySystemInvocations:]_block_invoke (in UIKitCore) + 312
21
UIKitCore
+[_UIAppearance appearancesAtNode:withObject:] (in UIKitCore) + 992
22
UIKitCore
__processEventQueue (in UIKitCore) + 8700
23
UIKitCore
_UIDrawViewRectAfterCommit (in UIKitCore) + 708
24
UIKitCore
-[_UIStatusBarLockView animateUnlockWithCompletionBlock:] (in UIKitCore) + 704
25
UIKitCore
-[_UIStatusBarDualCellularSignalView setTopConstraint:] (in UIKitCore) + 0
26
CoreFoundation
-[__NSDictionary0 copy] (in CoreFoundation) + 0
27
CoreFoundation
__copy_helper_block_e8_32o40o48b56o64r (in CoreFoundation) + 16
28
CoreFoundation
__destroy_helper_block_e8_32o40o48b56r64r (in CoreFoundation) + 16
29
CoreFoundation
CFRunLoopTimerSetNextFireDate (in CoreFoundation) + 1072
30
CoreFoundation
CFRunLoopTimerCreate (in CoreFoundation) + 384
31
GraphicsServices
_GSSendEvent (in GraphicsServices) + 252
32
UIKitCore
-[_UISearchControllerATVSearchBarAnimator _updateLayoutForGridKeyboard:animated:] (in UIKitCore) + 4092
33
UIKitCore
-[_UISearchFormSheetPresentationController presentationTransitionWillBegin] (in UIKitCore) + 20
Is anyone familiar with this? Thx in advance

Related

react native ios crash on launch UIKitCore

we're getting a small number but regular crashes on launch in a production app.
We have Crashlytics and Sentry but i cant see any references to the react code.
Here is a couple of stacktraces
Crashed: com.apple.main-thread
0 libsystem_kernel.dylib 0x2d318 __abort_with_payload + 8
1 libsystem_kernel.dylib 0x2fc24 abort_with_payload_wrapper_internal + 104
2 libsystem_kernel.dylib 0x2fbbc abort_with_payload_wrapper_internal + 30
3 libobjc.A.dylib 0x2d0b4 _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 116
4 libobjc.A.dylib 0x2d040 _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 30
5 libobjc.A.dylib 0x5acc weak_register_no_lock + 392
6 libobjc.A.dylib 0xa924 objc_storeWeak + 448
7 UIKitCore 0x2a2ee0 -[_UIBoundingPath initWithCoordinateSpace:] + 96
8 UIKitCore 0x613fc4 -[_UIComplexBoundingPath initWithCoordinateSpace:orientation:scale:boundingPathBitmap:] + 112
9 UIKitCore 0x3f11d0 -[_UIScreenComplexBoundingPathUtilities boundingPathForWindow:] + 2836
10 UIKitCore 0x675ddc -[UIWindow _boundingPath] + 204
11 UIKitCore 0x1b1650 -[UIView(UIViewBoundingPathSupportInternal) _effectiveBoundingPathAndBoundingPathView:] + 244
12 UIKitCore 0x4bab4c -[UIView(UIViewBoundingPathSupport) _rectTuckedAgainstBoundingPathEdge:withSize:cornerRadii:minimumPadding:] + 260
13 UIKitCore 0x6b74f8 -[_UISheetLayoutInfo _unsafeInsets] + 160
14 UIKitCore 0x71f18 -[_UISheetLayoutInfo _marginsWhenFloating] + 184
15 UIKitCore 0x3aca4c -[_UISheetLayoutInfo _isEdgeAttached] + 52
16 UIKitCore 0x467ffc -[_UISheetLayoutInfo _reversedIndexOfLastUndimmedDetent] + 84
17 UIKitCore 0x2d713c -[_UISheetLayoutInfo _activeDetentValues] + 348
18 UIKitCore 0x24b990 -[_UISheetLayoutInfo _offsetForCurrentActiveDetent] + 48
19 UIKitCore 0x583b5c -[_UISheetLayoutInfo _frameOfPresentedViewInContainerView] + 100
20 UIKitCore 0x3cad98 -[UISheetPresentationController _containerViewLayoutSubviews] + 652
21 UIKitCore 0x2231dc -[UITransitionView layoutSubviews] + 92
22 UIKitCore 0x18c17c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2592
23 QuartzCore 0x407fc CA::Layer::layout_if_needed(CA::Transaction*) + 532
24 QuartzCore 0x32c60 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 136
25 QuartzCore 0x475b4 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 452
26 QuartzCore 0x504a8 CA::Transaction::commit() + 704
27 QuartzCore 0x323a0 CA::Transaction::flush_as_runloop_observer(bool) + 88
28 UIKitCore 0x53e6e0 _UIApplicationFlushCATransaction + 72
29 UIKitCore 0x7d8d5c _UIUpdateSequenceRun + 84
30 UIKitCore 0xe5fedc schedulerStepScheduledMainSection + 144
31 UIKitCore 0xe5f6a4 runloopSourceCallback + 92
32 CoreFoundation 0xbb414 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
33 CoreFoundation 0xcc1a0 __CFRunLoopDoSource0 + 208
34 CoreFoundation 0x5694 __CFRunLoopDoSources0 + 268
35 CoreFoundation 0xb05c __CFRunLoopRun + 828
36 CoreFoundation 0x1ebc8 CFRunLoopRunSpecific + 600
37 GraphicsServices 0x1374 GSEventRunModal + 164
38 UIKitCore 0x514b58 -[UIApplication _run] + 1100
39 UIKitCore 0x296090 UIApplicationMain + 364
40 App. 0x72a4 main + 8 (main.m:8)
Crashed: com.apple.main-thread
0 libsystem_kernel.dylib 0x2d318 __abort_with_payload + 8
1 libsystem_kernel.dylib 0x2fc24 abort_with_payload_wrapper_internal + 104
2 libsystem_kernel.dylib 0x2fbbc abort_with_payload_wrapper_internal + 30
3 libobjc.A.dylib 0x2d0b4 _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 116
4 libobjc.A.dylib 0x2d040 _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 30
5 libobjc.A.dylib 0x5acc weak_register_no_lock + 392
6 libobjc.A.dylib 0xa924 objc_storeWeak + 448
7 UIKitCore 0x2a2ee0 -[_UIBoundingPath initWithCoordinateSpace:] + 96
8 UIKitCore 0x613fc4 -[_UIComplexBoundingPath initWithCoordinateSpace:orientation:scale:boundingPathBitmap:] + 112
9 UIKitCore 0x3f11d0 -[_UIScreenComplexBoundingPathUtilities boundingPathForWindow:] + 2836
10 UIKitCore 0x675ddc -[UIWindow _boundingPath] + 204
11 UIKitCore 0x1b1650 -[UIView(UIViewBoundingPathSupportInternal) _effectiveBoundingPathAndBoundingPathView:] + 244
12 UIKitCore 0x4bab4c -[UIView(UIViewBoundingPathSupport) _rectTuckedAgainstBoundingPathEdge:withSize:cornerRadii:minimumPadding:] + 260
13 UIKitCore 0x6b74f8 -[_UISheetLayoutInfo _unsafeInsets] + 160
14 UIKitCore 0x71f18 -[_UISheetLayoutInfo _marginsWhenFloating] + 184
15 UIKitCore 0x3aca4c -[_UISheetLayoutInfo _isEdgeAttached] + 52
16 UIKitCore 0x467ffc -[_UISheetLayoutInfo _reversedIndexOfLastUndimmedDetent] + 84
17 UIKitCore 0x2d713c -[_UISheetLayoutInfo _activeDetentValues] + 348
18 UIKitCore 0x24b990 -[_UISheetLayoutInfo _offsetForCurrentActiveDetent] + 48
19 UIKitCore 0x583b5c -[_UISheetLayoutInfo _frameOfPresentedViewInContainerView] + 100
20 UIKitCore 0x3cad98 -[UISheetPresentationController _containerViewLayoutSubviews] + 652
21 UIKitCore 0x2231dc -[UITransitionView layoutSubviews] + 92
22 UIKitCore 0x18c17c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2592
23 QuartzCore 0x407fc CA::Layer::layout_if_needed(CA::Transaction*) + 532
24 QuartzCore 0x32c60 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 136
25 QuartzCore 0x475b4 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 452
26 QuartzCore 0x504a8 CA::Transaction::commit() + 704
27 QuartzCore 0x323a0 CA::Transaction::flush_as_runloop_observer(bool) + 88
28 UIKitCore 0x53e6e0 _UIApplicationFlushCATransaction + 72
29 UIKitCore 0x7d8d5c _UIUpdateSequenceRun + 84
30 UIKitCore 0xe5fedc schedulerStepScheduledMainSection + 144
31 UIKitCore 0xe5f6a4 runloopSourceCallback + 92
32 CoreFoundation 0xbb414 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
33 CoreFoundation 0xcc1a0 __CFRunLoopDoSource0 + 208
34 CoreFoundation 0x5694 __CFRunLoopDoSources0 + 268
35 CoreFoundation 0xb05c __CFRunLoopRun + 828
36 CoreFoundation 0x1ebc8 CFRunLoopRunSpecific + 600
37 GraphicsServices 0x1374 GSEventRunModal + 164
38 UIKitCore 0x514b58 -[UIApplication _run] + 1100
39 UIKitCore 0x296090 UIApplicationMain + 364
40 App. 0x77f8 main + 8 (main.m:8)
41 ??? 0x105a99da4 (Missing)
my only clue is from "initWithCoordinateSpace:orientation:scale:boundingPathBitmap" If there was a corrupt http image reference could this be causing a crash somewhere?
We are also using Firebase in-app-messaging. Could this be crashing the app on startup?

How to find the View controller name and method name where exactly application crashed in ios?

I'm unable to get which causes the application to crash. I'm having binary file and dSYM file along with crash report and I tried different ways (terminal commands) to symbolicate crash log but no luck. Please find the below crash information.
Incident Identifier: A6366067-1843-4FA8-8914-501E78105012
CrashReporter Key:
Hardware Model: iPhone5,1
Process: CustomerCare [255]
Path: /private/var/mobile/Containers/Bundle/Application/B5BA73A3-D2B6-427B-83A9-3E8D3DE20932/Appname.app/Appname
Identifier: com.compName.Appname
Version: 8.0.6
Code Type: ARM
Parent Process: launchd [1]
Date/Time: 2015-10-01 16:22:05 +0000
OS Version: iPhone OS 8.2 (12D508)
Report Version: 104
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0xb000000c
Crashed Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x35673f46 objc_msgSend (in libobjc.A.dylib) + 6
1 UIKit 0x2adbaf2d -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] (in UIKit) + 173
2 UIKit 0x2adbadc1 -[UITableViewRowData rectForFooterInSection:heightCanBeGuessed:] (in UIKit) + 329
3 UIKit 0x2adbac01 -[UITableViewRowData heightForTable] (in UIKit) + 57
4 UIKit 0x2adbaa39 -[UITableView _updateContentSize] (in UIKit) + 345
5 UIKit 0x2adc078b -[UITableView didMoveToWindow] (in UIKit) + 71
6 UIKit 0x2aceb185 -[UIView(Internal) _didMoveFromWindow:toWindow:] (in UIKit) + 1313
7 UIKit 0x2ad0a07b -[UIScrollView _didMoveFromWindow:toWindow:] (in UIKit) + 51
8 UIKit 0x2aceaef5 -[UIView(Internal) _didMoveFromWindow:toWindow:] (in UIKit) + 657
9 UIKit 0x2aceaef5 -[UIView(Internal) _didMoveFromWindow:toWindow:] (in UIKit) + 657
10 UIKit 0x2aceaef5 -[UIView(Internal) _didMoveFromWindow:toWindow:] (in UIKit) + 657
11 UIKit 0x2acea805 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke (in UIKit) + 113
12 UIKit 0x2acea721 -[UIView(Hierarchy) _postMovedFromSuperview:] (in UIKit) + 429
13 UIKit 0x2acf4bcf -[UIView(Internal) _addSubview:positioned:relativeTo:] (in UIKit) + 1463
14 UIKit 0x2acf460f -[UIView(Hierarchy) addSubview:] (in UIKit) + 31
15 UIKit 0x2aeb9e21 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke (in UIKit) + 1121
16 UIKit 0x2acfada5 +[UIView(Animation) performWithoutAnimation:] (in UIKit) + 73
17 UIKit 0x2aeb977d -[_UINavigationParallaxTransition animateTransition:] (in UIKit) + 813
18 UIKit 0x2ae77cfd -[UINavigationController _startCustomTransition:] (in UIKit) + 2861
19 UIKit 0x2ad97027 -[UINavigationController _startDeferredTransitionIfNeeded:] (in UIKit) + 423
20 UIKit 0x2ad96e2d -[UINavigationController __viewWillLayoutSubviews] (in UIKit) + 45
21 UIKit 0x2ad96dc1 -[UILayoutContainerView layoutSubviews] (in UIKit) + 185
22 UIKit 0x2aceb7ff -[UIView(CALayerDelegate) layoutSublayersOfLayer:] (in UIKit) + 515
23 QuartzCore 0x2a711835 -[CALayer layoutSublayers] (in QuartzCore) + 137
24 QuartzCore 0x2a70d20d CA::Layer::layout_if_needed(CA::Transaction*)() (in QuartzCore) + 361
25 QuartzCore 0x2a70d095 CA::Layer::layout_and_display_if_needed(CA::Transaction*)() (in QuartzCore) + 17
26 QuartzCore 0x2a70ca71 CA::Context::commit_transaction(CA::Transaction*)() (in QuartzCore) + 225
27 QuartzCore 0x2a70c875 CA::Transaction::commit()() (in QuartzCore) + 325
28 UIKit 0x2aced203 _UIApplicationHandleEventQueue (in UIKit) + 1443
29 CoreFoundation 0x27797fbf __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ (in CoreFoundation) + 15
30 CoreFoundation 0x277973cf __CFRunLoopDoSources0 (in CoreFoundation) + 219
31 CoreFoundation 0x27795a35 __CFRunLoopRun (in CoreFoundation) + 773
32 CoreFoundation 0x276e33b1 CFRunLoopRunSpecific (in CoreFoundation) + 477
33 CoreFoundation 0x276e31c3 CFRunLoopRunInMode (in CoreFoundation) + 107
34 GraphicsServices 0x2ed10201 GSEventRunModal (in GraphicsServices) + 137
35 UIKit 0x2ad4d43d UIApplicationMain (in UIKit) + 1441
36 CustomerCare 0x0022886b 0x6c000 + 1820779
37 libdyld.dylib 0x35bf3aaf start (in libdyld.dylib) + 3

Tracing cause of NSRangeException - exception breakpoint always returns to `int main(int argc, char * argv[])`

I've been stuck on this all day, and struggling to identify the source of a NSRangeException crash.
The app builds fine, but in the process of loading the first scene it throws:
2015-05-01 17:21:48.606 AppName[3707:447852] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 4 beyond bounds [0 .. 3]'
The full stack trace is:
*** First throw call stack:
(
0 CoreFoundation 0x0000000111d22c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000111584bb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000111c0c093 -[__NSArrayM objectAtIndex:] + 227
3 UIKit 0x000000010f311881 _UIViewTopDownSubtreeTraversal + 193
4 UIKit 0x000000010f932fa3 -[UIView(UIConstraintBasedLayout_EngineDelegate) _invalidateSystemLayoutSizeFittingSizeAtEngineDelegateLevel] + 141
5 Foundation 0x000000010e931d6f -[NSISEngine tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:] + 915
6 Foundation 0x000000010eabc1e8 -[NSLayoutConstraint _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:] + 275
7 Foundation 0x000000010e92649a -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 220
8 UIKit 0x000000010f92fa34 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 474
9 Foundation 0x000000010e9341be -[NSISEngine withBehaviors:performModifications:] + 155
10 UIKit 0x000000010f92f83a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 452
11 UIKit 0x000000010f92f64d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 197
12 UIKit 0x000000010f92f933 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 217
13 Foundation 0x000000010e9341be -[NSISEngine withBehaviors:performModifications:] + 155
14 UIKit 0x000000010f92f83a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 452
15 UIKit 0x000000010f92f64d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 197
16 UIKit 0x000000010f92f2de -[UIView(AdditionalLayoutSupport) _initializeHostedLayoutEngine] + 404
17 UIKit 0x000000010f92426e -[UIView(UIConstraintBasedLayout) _layoutEngine_windowDidChange] + 126
18 UIKit 0x000000010f32f561 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 209
19 UIKit 0x000000010f32f74a -[UIView(Internal) _didMoveFromWindow:toWindow:] + 698
20 UIKit 0x000000010f327ecf __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 125
21 UIKit 0x000000010f327e43 -[UIView(Hierarchy) _postMovedFromSuperview:] + 437
22 UIKit 0x000000010f331f48 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1660
23 UIKit 0x000000010f61884c -[UINavigationTransitionView transition:fromView:toView:] + 479
24 UIKit 0x000000010f4161b0 -[UINavigationController _startTransition:fromViewController:toViewController:] + 2984
25 UIKit 0x000000010f416448 -[UINavigationController _startDeferredTransitionIfNeeded:] + 523
26 UIKit 0x000000010f416f0e -[UINavigationController __viewWillLayoutSubviews] + 43
27 UIKit 0x000000010f561715 -[UILayoutContainerView layoutSubviews] + 202
28 UIKit 0x000000010f334a2b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 536
29 QuartzCore 0x000000010eff4ec2 -[CALayer layoutSublayers] + 146
30 QuartzCore 0x000000010efe96d6 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
31 QuartzCore 0x000000010efe9546 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
32 QuartzCore 0x000000010ef55886 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
33 QuartzCore 0x000000010ef56a3a _ZN2CA11Transaction6commitEv + 462
34 UIKit 0x000000010f2b2a2d -[UIApplication _reportMainSceneUpdateFinished:] + 44
35 UIKit 0x000000010f2b36f1 -[UIApplication _runWithMainScene:transitionContext:completion:] + 2648
36 UIKit 0x000000010f2b20d5 -[UIApplication workspaceDidEndTransaction:] + 179
37 FrontBoardServices 0x00000001158955e5 __31-[FBSSerialQueue performAsync:]_block_invoke_2 + 21
38 CoreFoundation 0x0000000111c5641c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
39 CoreFoundation 0x0000000111c4c165 __CFRunLoopDoBlocks + 341
40 CoreFoundation 0x0000000111c4b923 __CFRunLoopRun + 851
41 CoreFoundation 0x0000000111c4b366 CFRunLoopRunSpecific + 470
42 UIKit 0x000000010f2b1b42 -[UIApplication _run] + 413
43 UIKit 0x000000010f2b4900 UIApplicationMain + 1282
44 My360 0x000000010dcf26ff main + 111
45 libdyld.dylib 0x00000001127f5145 start + 1
46 ??? 0x0000000000000001 0x0 + 1
)
It's a large app, and I cannot identify which objectAtIndex is causing the issue.
After looking at similar issues, I added an Exception breakpoint:
However the breakpoint just keeps taking me back to the main.m file:
int main(int argc, char * argv[]) {
#autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
Can anyone point me towards how I can identify the line that is causing this exception?
Thanks!
Edit:
When I click on the My360 icon at the top of the debugging console, it shows this:

App works on iPhone Simulator, but crashes on real iPhone Device

Today i tried running my app on my iPhone device, and it crashed! It worked perfectly fine on the simulator, I don't know what the problem is.
These are the crash logs:
Identifier: Evader
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2012-09-13 16:41:54.656 -0700
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x377d888f __exceptionPreprocess + 163
1 libobjc.A.dylib 0x354dd259 objc_exception_throw + 33
2 CoreFoundation 0x377d8789 +[NSException raise:format:] + 1
3 Foundation 0x380173a3 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 91
4 Evader 0x0012ca41 -[CCSprite initWithTexture:] (CCSprite.m:192)
5 Evader 0x0012c1b1 +[CCSprite spriteWithTexture:] (CCSprite.m:83)
6 Evader 0x0011eb3d -[CCProgressTimer initWithTexture:] (CCProgressTimer.m:69)
7 Evader 0x0011ea55 -[CCProgressTimer initWithFile:] (CCProgressTimer.m:59)
8 Evader 0x0011e9e1 +[CCProgressTimer progressWithFile:] (CCProgressTimer.m:55)
9 Evader 0x00173579 -[HelloWorldLayer lives] (HelloWorldLayer.m:256)
10 Evader 0x001723ed -[HelloWorldLayer init] (HelloWorldLayer.m:101)
11 Evader 0x0010f073 +[CCNode node] (CCNode.m:258)
12 Evader 0x0017bd11 -[StartMenu doThis:] (StartMenu.m:75)
13 CoreFoundation 0x377db7e4 __invoking___ + 68
14 CoreFoundation 0x377367b1 -[NSInvocation invoke] + 161
15 Evader 0x0010aa03 -[CCMenuItem activate] (CCMenuItem.m:129)
16 Evader 0x001085ff -[CCMenu ccTouchEnded:withEvent:] (CCMenu.m:198)
17 CoreFoundation 0x377323fd -[NSObject performSelector:withObject:withObject:] + 53
18 Evader 0x0014f4ff -[CCTouchDispatcher touches:withEvent:withTouchType:] (CCTouchDispatcher.m:268)
19 Evader 0x0014fc43 -[CCTouchDispatcher touchesEnded:withEvent:] (CCTouchDispatcher.m:338)
20 Evader 0x001515c3 -[EAGLView touchesEnded:withEvent:] (EAGLView.m:332)
21 UIKit 0x314c692b -[UIWindow _sendTouchesForEvent:] + 319
22 UIKit 0x314c6319 -[UIWindow sendEvent:] + 381
23 UIKit 0x314ac695 -[UIApplication sendEvent:] + 357
24 UIKit 0x314abf3b _UIApplicationHandleEvent + 5827
25 GraphicsServices 0x33eee22b PurpleEventCallback + 883
26 CoreFoundation 0x377ac523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 39
27 CoreFoundation 0x377ac4c5 __CFRunLoopDoSource1 + 141
28 CoreFoundation 0x377ab313 __CFRunLoopRun + 1371
29 CoreFoundation 0x3772e4a5 CFRunLoopRunSpecific + 301
30 CoreFoundation 0x3772e36d CFRunLoopRunInMode + 105
31 GraphicsServices 0x33eed439 GSEventRunModal + 137
32 UIKit 0x314dacd5 UIApplicationMain + 1081
33 Evader 0x00171029 main (main.m:14)
34 Evader 0x000dec68 start + 40
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3198f32c __pthread_kill + 8
1 libsystem_c.dylib 0x3408c208 pthread_kill + 48
2 libsystem_c.dylib 0x34085298 abort + 88
3 libc++abi.dylib 0x36f12f64 abort_message + 40
4 libc++abi.dylib 0x36f10346 _ZL17default_terminatev + 18
5 libobjc.A.dylib 0x354dd350 _objc_terminate + 140
6 libc++abi.dylib 0x36f103be _ZL19safe_handler_callerPFvvE + 70
7 libc++abi.dylib 0x36f1044a std::terminate() + 14
8 libc++abi.dylib 0x36f1181e __cxa_rethrow + 82
9 libobjc.A.dylib 0x354dd2a2 objc_exception_rethrow + 6
10 CoreFoundation 0x3772e506 CFRunLoopRunSpecific + 398
11 CoreFoundation 0x3772e366 CFRunLoopRunInMode + 98
12 GraphicsServices 0x33eed432 GSEventRunModal + 130
13 UIKit 0x314dacce UIApplicationMain + 1074
14 Evader 0x00171022 main (main.m:14)
15 Evader 0x000dec60 start + 32
I have tried to look for the error, but I do not know what to look for. Can someone help solve this problem?
CCSprite initWithTexture: raises the exception that causes your app to exit. I'm not entirely up on Cocos2d but a quick check in the documentation suggests it raises exceptions on failure to find named files.
That being the case, I'd guess the problem is simply one of filename case. Macs are by default case insensitive. So if you have FunnyImage.png then the simulator will succeed if you attempt to load funnyimage.png.
iOS devices are case sensitive. So it will fail if you attempt to load funnyimage.png.
So probably what you want to do is check that all the filenames you've used in code exactly match the case of the actual files.

What is "Application Specific Backtrace" in crash log?

I notice that in my app's crash log on OS X that one of the first sections is "Application Specific Backtrace". It shows something like this:
Application Specific Backtrace 1:
0 CoreFoundation 0x00007fff8acef716 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff8d723470 objc_exception_throw + 43
2 CoreFoundation 0x00007fff8ad7df07 -[__NSDictionaryM setObject:forKey:] + 135
3 My App 0x00000001030c6f72 My App + 81778
4 My App 0x00000001030c7969 My App + 84329
5 AppKit 0x00007fff8c3d5afa -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 1012
6 AppKit 0x00007fff8c5ec1d6 -[NSNib _instantiateNibWithExternalNameTable:] + 610
7 AppKit 0x00007fff8c5ebf43 -[NSNib instantiateNibWithOwner:topLevelObjects:] + 254
8 AppKit 0x00007fff8c5eb4f7 -[NSViewController loadView] + 184
9 AppKit 0x00007fff8c593349 -[NSViewController view] + 41
10 My App 0x00000001030cae69 My App + 97897
11 My App 0x00000001030cbb3a My App + 101178
12 AppKit 0x00007fff8c590322 -[NSTableView _sendDelegateHeightOfRow:] + 130
13 AppKit 0x00007fff8c5900db -[NSTableView _uncachedRectHeightOfRow:] + 197
14 AppKit 0x00007fff8c58ff2c -[_NSTableRowHeightStorage _cacheRowHeights] + 163
15 AppKit 0x00007fff8c54a6f5 -[_NSTableRowHeightStorage _ensureRowHeights] + 80
16 AppKit 0x00007fff8c5680cb -[_NSTableRowHeightStorage computeRowAtPoint:] + 38
17 AppKit 0x00007fff8c567fd9 -[NSTableView rowAtPoint:] + 306
18 AppKit 0x00007fff8c566af7 -[NSTableView rowsInRect:] + 375
19 AppKit 0x00007fff8c597ca4 _NSTVVisibleRowsForUpdate + 673
20 AppKit 0x00007fff8c5971e5 -[NSTableRowData _unsafeUpdateVisibleRowEntries] + 96
21 AppKit 0x00007fff8c597001 -[NSTableRowData updateVisibleRowViews] + 119
22 AppKit 0x00007fff8c56f0fb -[NSTableView viewWillDraw] + 165
23 AppKit 0x00007fff8c44cbed __22-[NSView viewWillDraw]_block_invoke_0 + 307
24 CoreFoundation 0x00007fff8ace80b6 __NSArrayEnumerate + 582
25 AppKit 0x00007fff8c44c92d -[NSView viewWillDraw] + 244
26 AppKit 0x00007fff8c44bf84 -[NSView _sendViewWillDrawInRect:clipRootView:] + 1525
27 AppKit 0x00007fff8c4183f1 -[NSView displayIfNeeded] + 1044
28 AppKit 0x00007fff8c4c429e -[NSClipView _immediateScrollToPoint:] + 7852
29 AppKit 0x00007fff8c4c2342 -[NSClipView scrollToPoint:] + 268
30 AppKit 0x00007fff8c58acdd -[NSScrollView scrollClipView:toPoint:] + 426
31 AppKit 0x00007fff8c4c20cc -[NSClipView _scrollTo:animateScroll:flashScrollerKnobs:] + 1626
32 AppKit 0x00007fff8c39d579 -[NSClipView _scrollTo:animate:] + 28
33 AppKit 0x00007fff8caab2a1 __31-[NSScrollView _snapRubberBand]_block_invoke_0610 + 1989
34 AppKit 0x00007fff8ca2412a ____NSPeriodicInvokerScheduled_block_invoke_0 + 57
35 libdispatch.dylib 0x00007fff8a013f3d _dispatch_call_block_and_release + 15
36 libdispatch.dylib 0x00007fff8a0100fa _dispatch_client_callout + 8
37 libdispatch.dylib 0x00007fff8a0149ab _dispatch_after_timer_callback + 22
38 libdispatch.dylib 0x00007fff8a0100fa _dispatch_client_callout + 8
39 libdispatch.dylib 0x00007fff8a0122d7 _dispatch_source_invoke + 691
40 libdispatch.dylib 0x00007fff8a011349 _dispatch_queue_invoke + 72
41 libdispatch.dylib 0x00007fff8a0150cd _dispatch_main_queue_callback_4CF + 220
42 CoreFoundation 0x00007fff8ac9181e __CFRunLoopRun + 1614
43 CoreFoundation 0x00007fff8ac90dd2 CFRunLoopRunSpecific + 290
44 HIToolbox 0x00007fff85323774 RunCurrentEventLoopInMode + 209
45 HIToolbox 0x00007fff85323512 ReceiveNextEventCommon + 356
46 HIToolbox 0x00007fff853233a3 BlockUntilNextEventMatchingListInMode + 62
47 AppKit 0x00007fff8c414fa3 _DPSNextEvent + 685
48 AppKit 0x00007fff8c414862 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
49 AppKit 0x00007fff8c40bc03 -[NSApplication run] + 517
50 AppKit 0x00007fff8c3b0656 NSApplicationMain + 869
51 My App 0x00000001030b4554 My App + 5460
52 ??? 0x0000000000000002 0x0 + 2
I know that's code that was running on the main thread, but yet it's shown in that section and NOT in the Thread 0 backtrace, which looks something like this:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff8588d212 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff8e1fab34 pthread_kill + 90
2 libsystem_c.dylib 0x00007fff8e23edfa abort + 143
3 libc++abi.dylib 0x00007fff888abf87 abort_message + 257
4 libc++abi.dylib 0x00007fff888a9936 default_terminate() + 28
5 libobjc.A.dylib 0x00007fff8d7238f3 _objc_terminate() + 91
6 libc++.1.dylib 0x00007fff8694c8fe std::terminate() + 20
7 libobjc.A.dylib 0x00007fff8d72365e objc_terminate + 9
8 libdispatch.dylib 0x00007fff8a01010e _dispatch_client_callout + 28
9 libdispatch.dylib 0x00007fff8a0149ab _dispatch_after_timer_callback + 22
10 libdispatch.dylib 0x00007fff8a0100fa _dispatch_client_callout + 8
11 libdispatch.dylib 0x00007fff8a0122d7 _dispatch_source_invoke + 691
12 libdispatch.dylib 0x00007fff8a011349 _dispatch_queue_invoke + 72
13 libdispatch.dylib 0x00007fff8a0150cd _dispatch_main_queue_callback_4CF + 220
14 com.apple.CoreFoundation 0x00007fff8ac9181e __CFRunLoopRun + 1614
15 com.apple.CoreFoundation 0x00007fff8ac90dd2 CFRunLoopRunSpecific + 290
16 com.apple.HIToolbox 0x00007fff85323774 RunCurrentEventLoopInMode + 209
17 com.apple.HIToolbox 0x00007fff85323512 ReceiveNextEventCommon + 356
18 com.apple.HIToolbox 0x00007fff853233a3 BlockUntilNextEventMatchingListInMode + 62
19 com.apple.AppKit 0x00007fff8c414fa3 _DPSNextEvent + 685
20 com.apple.AppKit 0x00007fff8c414862 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
21 com.apple.AppKit 0x00007fff8c40bc03 -[NSApplication run] + 517
22 com.apple.AppKit 0x00007fff8c3b0656 NSApplicationMain + 869
23 com.mycompany.myapp 0x00000001030b4554 0x1030b3000 + 5460
What's the significance of "Application Specific Backtrace" and why isn't that code included in the main thread backtrace?
(To be clear, I'm not asking how to debug this code, I'm just looking for an explanation on the structure and meaning of the crash log itself. Thanks!)
This is how exception handling works. You have an exception on the main thread, where the NSException is created (it holds all info about exception including current stack trace). After throwing an exception object control is passed to the closest handler in the call stack, unwinding the stack between throw and catch point. If an exception is not caught, it is intercepted by a function called the uncaught exception handler. The uncaught exception handler always causes the program to exit but may perform some task before this happens.
The default uncaught exception handler logs a message to the console before it exits the program.
So in your case Application Specific Backtrace is the stacktrace when exception was thrown and Thread 0 Crashed:: Dispatch queue: com.apple.main-thread is the stack trace when the app was killed.
Notice that up to this point the stack trace is identical:
10 libdispatch.dylib 0x00007fff8a0100fa _dispatch_client_callout + 8
11 libdispatch.dylib 0x00007fff8a0122d7 _dispatch_source_invoke + 691
12 libdispatch.dylib 0x00007fff8a011349 _dispatch_queue_invoke + 72
13 libdispatch.dylib 0x00007fff8a0150cd _dispatch_main_queue_callback_4CF + 220
14 com.apple.CoreFoundation 0x00007fff8ac9181e __CFRunLoopRun + 1614
15 com.apple.CoreFoundation 0x00007fff8ac90dd2 CFRunLoopRunSpecific + 290
16 com.apple.HIToolbox 0x00007fff85323774 RunCurrentEventLoopInMode + 209
17 com.apple.HIToolbox 0x00007fff85323512 ReceiveNextEventCommon + 356
18 com.apple.HIToolbox 0x00007fff853233a3 BlockUntilNextEventMatchingListInMode + 62
19 com.apple.AppKit 0x00007fff8c414fa3 _DPSNextEvent + 685
20 com.apple.AppKit 0x00007fff8c414862 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
21 com.apple.AppKit 0x00007fff8c40bc03 -[NSApplication run] + 517
22 com.apple.AppKit 0x00007fff8c3b0656 NSApplicationMain + 869