dimanche 28 juin 2015

How to debug uncaught NSRange exception in Xcode?

I am getting the following exception. How can I find from looking at this as to where I am having a problem with my NSArray

*** Terminating app due to uncaught exception 'NSRangeException', reason:

'*** -[__NSArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000109ba4a75 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x000000010983dbb7 objc_exception_throw + 45
    2   CoreFoundation                      0x0000000109a9c97e -[__NSArrayI objectAtIndex:] + 190
    3   UIKit                               0x00000001076bd506 -[UITableViewDataSource tableView:heightForRowAtIndexPath:] + 109
    4   UIKit                               0x00000001073f0afb __66-[UISectionRowData refreshWithSection:tableView:tableViewRowData:]_block_invoke + 302
    5   UIKit                               0x00000001073f018e -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] + 4125
    6   UIKit                               0x00000001073f250b -[UITableViewRowData _ensureSectionOffsetIsValidForSection:] + 131
    7   UIKit                               0x00000001073f56f5 -[UITableViewRowData rectForFooterInSection:heightCanBeGuessed:] + 352
    8   UIKit                               0x00000001073f57ca -[UITableViewRowData heightForTable] + 56
    9   UIKit                               0x000000010724e553 -[UITableView _adjustExtraSeparators] + 216
    10  UIKit                               0x00000001072637b2 -[UITableView layoutSubviews] + 251
    11  UIKit                               0x00000001071f01c3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 521
    12  QuartzCore                          0x0000000108ad1c58 -[CALayer layoutSublayers] + 150
    13  QuartzCore                          0x0000000108ac687e _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
    14  QuartzCore                          0x0000000108ac66ee _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
    15  QuartzCore                          0x0000000108a3436e _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
    16  QuartzCore                          0x0000000108a35482 _ZN2CA11Transaction6commitEv + 390
    17  QuartzCore                          0x0000000108a35aed _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 89
    18  CoreFoundation                      0x0000000109ad9507 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
    19  CoreFoundation                      0x0000000109ad9460 __CFRunLoopDoObservers + 368
    20  CoreFoundation                      0x0000000109acf293 __CFRunLoopRun + 1123
    21  CoreFoundation                      0x0000000109acebc6 CFRunLoopRunSpecific + 470
    22  GraphicsServices                    0x000000010a460a58 GSEventRunModal + 161
    23  UIKit                               0x0000000107176580 UIApplicationMain + 1282
    24  APP_NAME                            0x0000000106d0dfc3 main + 115
    25  libdyld.dylib                       0x000000010aa68145 start + 1
    26  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Aucun commentaire:

Enregistrer un commentaire