Skip to content

Last section empty #11

@kozla13

Description

@kozla13

if the last section is empty and you try to drop a element into the section you will get following error:

2015-11-03 12:11:57.737 UITableView+Reorder[2943:75589] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 18446744073709551615 beyond bounds for empty array'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010f4bff45 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x000000010ef39deb objc_exception_throw + 48
    2   CoreFoundation                      0x000000010f3a39e4 -[__NSArrayM objectAtIndex:] + 212
    3   UITableView+Reorder                 0x000000010d2d79f3 -[SecondTableViewController tableView:heightForRowAtIndexPath:] + 323
    4   UIKit                               0x000000010d9145cf __66-[UISectionRowData refreshWithSection:tableView:tableViewRowData:]_block_invoke + 240
    5   UIKit                               0x000000010d913c5f -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] + 4876
    6   UIKit                               0x000000010d916898 -[UITableViewRowData ensureAllSectionsAreValid] + 109
    7   UIKit                               0x000000010d6e7132 -[UITableView _endCellAnimationsWithContext:] + 598
    8   UITableView+Reorder                 0x000000010d2d0900 -[UITableView(Reorder) movePlaceHolderRowFromIndexPath:toIndexPath:] + 640
    9   UITableView+Reorder                 0x000000010d2cf9b0 -[UITableView(Reorder) movePlaceHolderRowIfNeeded] + 8704
    10  UITableView+Reorder                 0x000000010d2cd5dd -[UITableView(Reorder) movingRowIsAtPoint:] + 4029
    11  UITableView+Reorder                 0x000000010d2cbee4 -[UITableView(Reorder) rowReorderGesture:] + 372
    12  UIKit                               0x000000010daa394f _UIGestureRecognizerSendTargetActions + 153
    13  UIKit                               0x000000010da9ffc1 _UIGestureRecognizerSendActions + 162
    14  UIKit                               0x000000010da9dfbe -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 843
    15  UIKit                               0x000000010daa6283 ___UIGestureRecognizerUpdate_block_invoke898 + 79
    16  UIKit                               0x000000010daa6121 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 342
    17  UIKit                               0x000000010da93bdd _UIGestureRecognizerUpdate + 2634
    18  UIKit                               0x000000010d6319c0 -[UIWindow _sendGesturesForEvent:] + 1137
    19  UIKit                               0x000000010d632bf6 -[UIWindow sendEvent:] + 849
    20  UIKit                               0x000000010d5e22fa -[UIApplication sendEvent:] + 263
    21  UIKit                               0x000000010d5bcabf _UIApplicationHandleEventQueue + 6844
    22  CoreFoundation                      0x000000010f3ec011 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    23  CoreFoundation                      0x000000010f3e1f3c __CFRunLoopDoSources0 + 556
    24  CoreFoundation                      0x000000010f3e13f3 __CFRunLoopRun + 867
    25  CoreFoundation                      0x000000010f3e0e08 CFRunLoopRunSpecific + 488
    26  GraphicsServices                    0x0000000112470ad2 GSEventRunModal + 161
    27  UIKit                               0x000000010d5c230d UIApplicationMain + 171
    28  UITableView+Reorder                 0x000000010d2d61df main + 111
    29  libdyld.dylib                       0x000000011018192d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions