I found this via a crash report:
*** -[__NSArrayM objectAtIndex:]: index 9223372036854775807 beyond bounds [0 .. 8]
CoreFoundation-[__NSArrayM removeObjectAtIndex:]
This is the code responsible:
[self someMethodwithCallback:^(NSMutableArray *stickerArray)
{
_tableViewController.tableView beginUpdates];
_layersArray = stickerArray;
NSArray *reversed = [[_layersArray reverseObjectEnumerator] allObjects];
_layersArray = [reversed mutableCopy];
[_tableViewController.tableView insertRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:0 inSection:0]] withRowAnimation:UITableViewRowAnimationAutomatic];
[_tableViewController.tableView endUpdates];
[_tableViewController.tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] animated:YES scrollPosition:UITableViewScrollPositionNone];
[_delegate stickerSelectedAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
}
How and where would this huge index be happening?
I believe the index in question is NSNotFound
.
You're probably getting index from the result of a "find in array" operation (or the location of an NSRange returned from one)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With