I managed to solve the error with the help of a colleague. After paying more attention to the call stack, we realized that the app was crashing in a datasource method (index 3).
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 5 beyond bounds [0 .. 4]'
*** First throw call stack:
(
0 CoreFoundation 0x000000010188c795 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001015ef991 objc_exception_throw + 43
2 CoreFoundation 0x000000010184502f -[__NSArrayI objectAtIndex:] + 175
3 UIKit 0x00000001006d97df -[UITableViewDataSource tableView:indentationLevelForRowAtIndexPath:] + 115
4 UIKit 0x0000000100318a08 __53-[UITableView _configureCellForDisplay:forIndexPath:]_block_invoke + 1574
5 UIKit 0x00000001002a60ac +[UIView(Animation) performWithoutAnimation:] + 70
[...]
So, I added this and the results display perfectly fine now.
- (NSInteger)tableView:(UITableView *)tableView indentationLevelForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 0;
}
This actually solved two issues, as I noticed my search results had varying indentations before adding that method as well.