Debugging 'CALayer position contains NaN: [nan nan]' - ios

Right after updating Xcode to 8.3, I started receiving this error at launch: Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'
The main view for my app has a couple of container views, one of which holds a mapView. It appears the error has to do with the map, but I can't quite make out from the message what that might be. Any thoughts would be greatly appreciated!
*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'
*** First throw call stack:
(
0 CoreFoundation 0x00000001029b1b0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000102416141 objc_exception_throw + 48
2 CoreFoundation 0x0000000102a1a625 +[NSException raise:format:] + 197
3 QuartzCore 0x00000001039d90be _ZN2CA5Layer12set_positionERKNS_4Vec2IdEEb + 152
4 QuartzCore 0x00000001039d9231 -[CALayer setPosition:] + 43
5 MapKit 0x000000010354a97b -[MKMapView _updateScrollContainerView:] + 1214
6 MapKit 0x000000010354bbeb -[MKMapView _sizeDidChangeWithCenterCoordinate:] + 55
7 MapKit 0x000000010354606e -[MKMapView setBounds:] + 271
8 UIKit 0x0000000103c14b23 -[UIView(Geometry) _applyISEngineLayoutValuesToBoundsOnly:] + 598
9 UIKit 0x0000000103c14e0e -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 125
10 CoreFoundation 0x0000000102942652 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114
11 CoreFoundation 0x000000010294256f -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 335
12 UIKit 0x0000000103c1387c -[UIView(Geometry) resizeSubviewsWithOldSize:] + 183
13 UIKit 0x000000010452f1f9 -[UIView(AdditionalLayoutSupport) _is_layout] + 168
14 UIKit 0x0000000103c1fd56 -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 994
15 UIKit 0x0000000103c3120b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1268
16 QuartzCore 0x00000001039e2904 -[CALayer layoutSublayers] + 146
17 QuartzCore 0x00000001039d6526 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 370
18 QuartzCore 0x00000001039d63a0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
19 QuartzCore 0x0000000103965e92 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
20 QuartzCore 0x0000000103992130 _ZN2CA11Transaction6commitEv + 468
21 QuartzCore 0x0000000103992b37 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 115
22 CoreFoundation 0x0000000102957717 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
23 CoreFoundation 0x0000000102957687 __CFRunLoopDoObservers + 391
24 CoreFoundation 0x000000010293c038 CFRunLoopRunSpecific + 440
25 UIKit 0x0000000103b6802f -[UIApplication _run] + 468
26 UIKit 0x0000000103b6e0d4 UIApplicationMain + 159
27 Pulley 0x0000000101bd95b7 main + 55
28 libdyld.dylib 0x0000000109eaa65d start + 1
29 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

It seems that you are doing setPosition: using CALayer object and that CALayer object is nil. Thats why your app is crashed.
please check that CALayer is nil or not by if statement.

I figured it out. The problem stemmed from a 3rd party extension I was using for MapKit. After removing my mapView from storyboard and creating a new one programmatically, a new error pointed me to methods in the extension.

Related

NSLayoutConstraint constant is not finite! That's illegal. constant:inf

After iOS update version 10.3.3, a bug appeared in some devices, not all. that is..
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSLayoutConstraint constant is not finite! That's illegal. constant:inf firstAnchor:<NSLayoutXAxisAnchor:0x608000679c80 "_UINavigationBarContentView:0x7fce8d57aee0.right"> secondAnchor:<NSLayoutXAxisAnchor:0x608000679d00 "UILayoutGuide:0x6080001be680'UIViewLayoutMarginsGuide'.right">'
*** First throw call stack:
(
0 CoreFoundation 0x0000000110e3126b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000114a67f41 objc_exception_throw + 48
2 CoreFoundation 0x0000000110e36402 +[NSException raise:format:arguments:] + 98
3 Foundation 0x0000000111a5b749 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
4 Foundation 0x00000001119df92c -[NSLayoutConstraint _setSymbolicConstant:constant:] + 629
5 Foundation 0x00000001119df689 -[NSLayoutConstraint setConstant:] + 68
6 UIKit 0x0000000112a6dc52 -[UIView _updateLayoutMarginsGuideConstraintsIfNecessary] + 358
7 UIKit 0x0000000112a6de5e -[UIView _layoutMarginsDidChangeFromOldMargins:] + 194
8 UIKit 0x0000000112a6e849 -[UIView _updateInferredLayoutMarginsFromSuperview:] + 850
9 UIKit 0x0000000112a6fc03 -[UIView setSafeAreaInsets:] + 446
10 UIKit 0x0000000112a6f2a5 -[UIView _updateSafeAreaInsets] + 125
11 UIKit 0x0000000112a9c30e -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1571
12 UIKit 0x0000000112adc343 -[UINavigationBar layoutSublayersOfLayer:] + 178
13 QuartzCore 0x000000011264cc92 -[CALayer layoutSublayers] + 153
14 QuartzCore 0x0000000112650d79 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 401
15 QuartzCore 0x00000001125d9851 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 385
16 QuartzCore 0x00000001126051c2 _ZN2CA11Transaction6commitEv + 500
17 QuartzCore 0x0000000112605f14 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 76
18 CoreFoundation 0x0000000110dd3e57 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
19 CoreFoundation 0x0000000110dd3dae __CFRunLoopDoObservers + 430
20 CoreFoundation 0x0000000110db83c4 __CFRunLoopRun + 1572
21 CoreFoundation 0x0000000110db7b29 CFRunLoopRunSpecific + 409
22 GraphicsServices 0x000000011a8dd9c6 GSEventRunModal + 62
23 UIKit 0x00000001129ce9a4 UIApplicationMain + 159
24 APP NAME 0x000000010f8c1847 main + 55
25 libdyld.dylib 0x0000000117f8d621 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Funny thing is that this error doesn't make any sense to all the equipment. There was no error in my device (iOS 10.3.3)
so I tried running this app in Xcode 9 beta 5, iOS 11 beta 5 to get some error and appeared this assertion failure. I think There is a doubt about navigationBarItem.
Please help.
In my case I was getting an "infinite" origin for a valid UITextRange when trying to get UITextField.firstRect(). That was causing the constraint update to fail.
I would recommend to get Xcode 9 and debug your code there.

libc++abi.dylib: terminating with uncaught exception of type NSException (lldb) by appDelegate.swift

I have very limited knowledge in swift 3. My code compiles but app crashes upon launch with the following error. I have know clue what is going on or how to fix it. An help would be appreciated.
2017-02-14 15:34:58.535 Application[23749:1525292] *** Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3600.5.2/UITableView.m:8035
2017-02-14 15:34:58.538 Application[23749:1525292] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView (; layer = ; contentOffset: {0, 0}; contentSize: {375, 264}>) failed to obtain a cell from its dataSource ()'
*** First throw call stack:
(
0 CoreFoundation 0x0000000105ff934b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000102ed821e objc_exception_throw + 48
2 CoreFoundation 0x0000000105ffd442 +[NSException raise:format:arguments:] + 98
3 Foundation 0x0000000102a6ee4d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 UIKit 0x0000000103925bfe -[UITableView _configureCellForDisplay:forIndexPath:] + 222
5 UIKit 0x000000010393181c -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 860
6 UIKit 0x0000000103931a13 -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 74
7 UIKit 0x000000010390547d -[UITableView _updateVisibleCellsNow:isRecursive:] + 3295
8 UIKit 0x000000010393ad95 -[UITableView _performWithCachedTraitCollection:] + 110
9 UIKit 0x00000001039215ef -[UITableView layoutSubviews] + 222
10 UIKit 0x0000000103888f50 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1237
11 QuartzCore 0x0000000108dc5cc4 -[CALayer layoutSublayers] + 146
12 QuartzCore 0x0000000108db9788 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
13 QuartzCore 0x0000000108db9606 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
14 QuartzCore 0x0000000108d47680 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 280
15 QuartzCore 0x0000000108d74767 _ZN2CA11Transaction6commitEv + 475
16 QuartzCore 0x0000000108d750d7 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 113
17 CoreFoundation 0x0000000105f9de17 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
18 CoreFoundation 0x0000000105f9dd87 __CFRunLoopDoObservers + 391
19 CoreFoundation 0x0000000105f824b6 CFRunLoopRunSpecific + 454
20 UIKit 0x00000001037be7e6 -[UIApplication _run] + 434
21 UIKit 0x00000001037c4964 UIApplicationMain + 159
22 Application 0x00000001028efb6f main + 111
23 libdyld.dylib 0x0000000106f2668d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

iOS Contacts Picker

So i was doing a tutorial from Sinch! on how to Fetch and Call Contacts,
Well it loads up the Contacts just fine.
The problem is that whenever I select a Contact to call, the app crashes and Xcode shows this error on the console.
Can anyone help me with that?
inchAppToPhoneTutorial[1143:42160] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Parameter 'applicationKey' is invalid (was '')'
*** First throw call stack:
(
0 CoreFoundation 0x000000010a70634b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010a08821e objc_exception_throw + 48
2 SinchAppToPhoneTutorial 0x0000000108cca77b SINCallOrderByStartTimeComparator + 66724
3 SinchAppToPhoneTutorial 0x0000000108cb1c6b _ZN6rebrtc13OfflineInvite6encodeERKS0_PhmPm + 4418449
4 SinchAppToPhoneTutorial 0x0000000108cc4d45 SINCallOrderByStartTimeComparator + 43630
5 SinchAppToPhoneTutorial 0x0000000108cc496c SINCallOrderByStartTimeComparator + 42645
6 SinchAppToPhoneTutorial 0x00000001088268e9 -[DetailViewController initSinchClient] + 89
7 SinchAppToPhoneTutorial 0x0000000108825e8a -[DetailViewController viewDidLoad] + 234
8 UIKit 0x000000010accb06d -[UIViewController loadViewIfRequired] + 1258
9 UIKit 0x000000010acd14d6 -[UIViewController __viewWillAppear:] + 118
10 UIKit 0x000000010acfc393 -[UINavigationController _startCustomTransition:] + 1290
11 UIKit 0x000000010ad0d008 -[UINavigationController _startDeferredTransitionIfNeeded:] + 697
12 UIKit 0x000000010ad0e19b -[UINavigationController __viewWillLayoutSubviews] + 58
13 UIKit 0x000000010af051b7 -[UILayoutContainerView layoutSubviews] + 223
14 UIKit 0x000000010abee344 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1237
15 QuartzCore 0x000000010e03bcdc -[CALayer layoutSublayers] + 146
16 QuartzCore 0x000000010e02f7a0 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
17 QuartzCore 0x000000010e02f61e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
18 QuartzCore 0x000000010dfbd62c _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 280
19 QuartzCore 0x000000010dfea713 _ZN2CA11Transaction6commitEv + 475
20 UIKit 0x000000010ab54878 _afterCACommitHandler + 346
21 CoreFoundation 0x000000010a6aae17 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
22 CoreFoundation 0x000000010a6aad87 __CFRunLoopDoObservers + 391
23 CoreFoundation 0x000000010a68fb9e __CFRunLoopRun + 1198
24 CoreFoundation 0x000000010a68f494 CFRunLoopRunSpecific + 420
25 GraphicsServices 0x000000010e959a6f GSEventRunModal + 161
26 UIKit 0x000000010ab29f34 UIApplicationMain + 159
27 SinchAppToPhoneTutorial 0x00000001088257bf main + 111
28 libdyld.dylib 0x000000010c4fe68d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
It says what happened at the very top
inchAppToPhoneTutorial[1143:42160] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Parameter 'applicationKey' is invalid (was '')'
So figure out where you're calling something that utilizes an applicationKey and figure out why it's blank :)

app works on iphone 6plus simulator but not in iphone6 simulator

I'm developing an app that uses SQLITE and works perfectly on Iphone 6plus simulator but crash on Iphone6 simulator and also on Iphone5. I'm not sure what's the problem. Can anyone help me with that?
This is the debug error that I'm getting from Xcode
*** Terminating app due to uncaught exception 'NSRangeException', reason:
*** -[__NSArrayM objectAtIndex:]: index 9223372036854775807 beyond bounds [0 .. 10]'
*** First throw call stack:
(
0 CoreFoundation 0x000000010492ae65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001043a3deb objc_exception_throw + 48
2 CoreFoundation 0x000000010480e404 -[__NSArrayM objectAtIndex:] + 212
3 ILFCalc 0x0000000103d85cf8 -[EditInfoViewController loadInfoToEdit] + 424
4 ILFCalc 0x0000000103d83f76 -[EditInfoViewController viewDidLoad] + 1174
5 UIKit 0x0000000104e6df98 -[UIViewController loadViewIfRequired] + 1198
6 UIKit 0x0000000104e73f4f -[UIViewController __viewWillAppear:] + 120
7 UIKit 0x0000000104ea3e44 -[UINavigationController _startCustomTransition:] + 1203
8 UIKit 0x0000000104eb423f -[UINavigationController _startDeferredTransitionIfNeeded:] + 712
9 UIKit 0x0000000104eb53af -[UINavigationController __viewWillLayoutSubviews] + 57
10 UIKit 0x000000010505bff7 -[UILayoutContainerView layoutSubviews] + 248
11 UIKit 0x0000000104d8e4a3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 703
12 QuartzCore 0x000000010874559a -[CALayer layoutSublayers] + 146
13 QuartzCore 0x0000000108739e70 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
14 QuartzCore 0x0000000108739cee _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
15 QuartzCore 0x000000010872e475 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
16 QuartzCore 0x000000010875bc0a _ZN2CA11Transaction6commitEv + 486
17 QuartzCore 0x000000010875c37c _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
18 CoreFoundation 0x0000000104856367 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
19 CoreFoundation 0x00000001048562d7 __CFRunLoopDoObservers + 391
20 CoreFoundation 0x000000010484bf2b __CFRunLoopRun + 1147
21 CoreFoundation 0x000000010484b828 CFRunLoopRunSpecific + 488
22 GraphicsServices 0x0000000107fd2ad2 GSEventRunModal + 161
23 UIKit 0x0000000104cd7610 UIApplicationMain + 171
24 ILFCalc 0x0000000103d898af main + 111
25 libdyld.dylib 0x000000010631a92d start + 1
26 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

UitableView working fine on iOS8.4 (Xcode 6.4) but crashes on iOS9.1(Xcode 7.1.1)

The UITableView works fine when I am trying to use it through Xcode6.4, but when I'm trying it through Xcode 7.1.1 it crashes. I guess it's because of the iOS versions. I am attaching the crash log. Kindly suggest what the best way to fix it is. I am quite sure that:
1) Datasource and Delegates are working fine.
2) Numberofrows and heightOfRow methods are also getting called, but it crashes before the cellForRowAtIndexPath gets called.
Here is the log:
2016-02-05 15:34:27.400 Autograph24[3720:87023] * Assertion failure
in -[UITableViewRowData _assertValidIndexPath:allowEmptySection:],
/BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.29.5/UITableViewRowData.m:2310
2016-02-05 15:34:27.506 Autograph24[3720:87023] * Terminating app
due to uncaught exception 'NSInternalInconsistencyException', reason:
'Invalid indexPath'
*** First throw call stack: ( 0 CoreFoundation 0x00000001075c9f45 exceptionPreprocess + 165 1 libobjc.A.dylib
0x0000000107956deb objc_exception_throw + 48 2 CoreFoundation
0x00000001075c9daa +[NSException raise:format:arguments:] + 106 3
Foundation 0x0000000106e9b5ee
-[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198 4
UIKit 0x0000000108d11412
-[UITableViewRowData _assertValidIndexPath:allowEmptySection:] + 963 5 UIKit 0x0000000108d11465
-[UITableViewRowData ensureHeightsFaultedInForIndexPath:availHeight:edgeInset:scrollPosition:]
+ 55 6 UIKit 0x0000000108af50c6 -[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:] + 2510 7 UIKit 0x0000000108af59b9
-[UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] + 39 8 Autograph24 0x0000000106b1b2ad
-[DashboardVC scrollToToday] + 685 9 Autograph24 0x0000000106b20289 -[DashboardVC changeCalendarStyle] + 313 10
Autograph24 0x0000000106b20144 -[DashboardVC
resizeScreenForPortrait] + 788 11 Autograph24
0x0000000106b1f6a0 -[DashboardVC rotateScreen] + 176 12 Autograph24
0x0000000106b15e76 -[DashboardVC viewDidLoad] + 166 13 UIKit
0x0000000108b49cc4 -[UIViewController loadViewIfRequired] + 1198 14
UIKit 0x0000000108b4fc7b
-[UIViewController __viewWillAppear:] + 120 15 UIKit 0x0000000108b7fa37 -[UINavigationController _startCustomTransition:] +
1203 16 UIKit 0x0000000108b8fcdb
-[UINavigationController _startDeferredTransitionIfNeeded:] + 712 17 UIKit 0x0000000108b90cea
-[UINavigationController __viewWillLayoutSubviews] + 57 18 UIKit 0x0000000108d36c85 -[UILayoutContainerView layoutSubviews] + 248 19
UIKit 0x0000000108a6be40
-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 710 20 QuartzCore 0x000000010736359a -[CALayer
layoutSublayers] + 146 21 QuartzCore
0x0000000107357e70 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE +
366 22 QuartzCore 0x0000000107357cee
_ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24 23 QuartzCore 0x000000010734c475
_ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277 24 QuartzCore 0x0000000107379c0a
_ZN2CA11Transaction6commitEv + 486 25 QuartzCore 0x000000010737a37c
_ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92 26 CoreFoundation 0x00000001074f5947
__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23 27 CoreFoundation 0x00000001074f58b7
__CFRunLoopDoObservers + 391 28 CoreFoundation 0x00000001074eb50b __CFRunLoopRun + 1147 29 CoreFoundation
0x00000001074eae08 CFRunLoopRunSpecific + 488 30 GraphicsServices
0x000000010b1b5ad2 GSEventRunModal + 161 31 UIKit
0x00000001089b730d UIApplicationMain + 171 32 Autograph24
0x0000000106b15d9f main + 111 33 libdyld.dylib
0x000000010aac192d start + 1 34 ???
0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with
uncaught exception of type NSException
You have an invalid indexpath. That means that either the section or the row or both is not right. If you have a table with 2 sections and 2 rows per section then indexpath 0-3 is invalid, because section 0 does not provide a row 3. Similarly, indexpath 2-1 would be invalid, because section 2 does not exist (only 0 and 1).
As for how to fix this, first double check if all required methods are called and your data is correctly initialised. Then sprinkle breakpoints around your class. Mainly where you use any kind of indexpath, and see where it tries to read from outside your data.
Learn to read crash logs. In most cases and certainly in this case, they contain all the relevant information:
2016-02-05 15:34:27.400 Autograph24[3720:87023] * Assertion failure in -[UITableViewRowData _assertValidIndexPath:allowEmptySection:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.29.5/UITableViewRowData.m:2310
2016-02-05 15:34:27.506 Autograph24[3720:87023] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid indexPath'
It clearly says: reason: 'Invalid indexPath'
So first hint: an invalid index path (which is a well known thing if you work with UITableViews) was involved.
Next follows the stack trace where the error ocurred. The first few stack locations are within Apple's code. Usually skip them. But occasionally, they contain interesting hints. Here a function assertValidIndexPath:allowEmptySection:. That again shows that the index path is the problem.
*** First throw call stack: (
0 CoreFoundation 0x00000001075c9f45 exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000107956deb objc_exception_throw + 48
2 CoreFoundation 0x00000001075c9daa +[NSException raise:format:arguments:] + 106
3 Foundation 0x0000000106e9b5ee -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
4 UIKit 0x0000000108d11412 -[UITableViewRowData _assertValidIndexPath:allowEmptySection:] + 963
5 UIKit 0x0000000108d11465 -[UITableViewRowData ensureHeightsFaultedInForIndexPath:availHeight:edgeInset:scrollPosition:] + 55
6 UIKit 0x0000000108af50c6 -[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:] + 2510
7 UIKit 0x0000000108af59b9 -[UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] + 39
Here your code follows. Look at the line above and below. It says that your function [DashboardVC scrollToToday] has called the function [UITableView scrollToRowAtIndexPath:atScrollPosition:animated:]. This is where the error was triggered in your code.
8 Autograph24 0x0000000106b1b2ad -[DashboardVC scrollToToday] + 685
9 Autograph24 0x0000000106b20289 -[DashboardVC changeCalendarStyle] + 313
10 Autograph24 0x0000000106b20144 -[DashboardVC resizeScreenForPortrait] + 788
11 Autograph24 0x0000000106b1f6a0 -[DashboardVC rotateScreen] + 176
12 Autograph24 0x0000000106b15e76 -[DashboardVC viewDidLoad] + 166
This is the next interesting location. Here Apple's UIKit called your [DashboardVC viewDidLoad]. So that gives a lot of context. It happend early during the construction of you view in the viewDidLoad phase.
13 UIKit 0x0000000108b49cc4 -[UIViewController loadViewIfRequired] + 1198
14 UIKit 0x0000000108b4fc7b -[UIViewController __viewWillAppear:] + 120
15 UIKit 0x0000000108b7fa37 -[UINavigationController _startCustomTransition:] + 1203
16 UIKit 0x0000000108b8fcdb -[UINavigationController _startDeferredTransitionIfNeeded:] + 712
17 UIKit 0x0000000108b90cea -[UINavigationController __viewWillLayoutSubviews] + 57
18 UIKit 0x0000000108d36c85 -[UILayoutContainerView layoutSubviews] + 248
19 UIKit 0x0000000108a6be40 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 710
20 QuartzCore 0x000000010736359a -[CALayer layoutSublayers] + 146
21 QuartzCore 0x0000000107357e70 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
22 QuartzCore 0x0000000107357cee _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
23 QuartzCore 0x000000010734c475 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
24 QuartzCore 0x0000000107379c0a _ZN2CA11Transaction6commitEv + 486
25 QuartzCore 0x000000010737a37c _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
26 CoreFoundation 0x00000001074f5947 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23
27 CoreFoundation 0x00000001074f58b7 __CFRunLoopDoObservers + 391
28 CoreFoundation 0x00000001074eb50b __CFRunLoopRun + 1147
29 CoreFoundation 0x00000001074eae08 CFRunLoopRunSpecific + 488
30 GraphicsServices 0x000000010b1b5ad2 GSEventRunModal + 161
31 UIKit 0x00000001089b730d UIApplicationMain + 171
32 Autograph24 0x0000000106b15d9f main + 111
33 libdyld.dylib 0x000000010aac192d start + 1
34 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib:
terminating with uncaught exception of type NSException
Combining this information I would conclude that you call [UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] from within [DashboardVC viewDidLoad], which is bound to fail with any index path because the UITableView is not properly constructed at this time of the view controller's lifecycle.
Earlier iOS versions were more lenient here; but later versions are rather restrictive about what you can do before the view controller is fully constructed.
You will need to move your [UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] call to either viewWillAppear: or even viewDidAppear:.

Resources