I've been stuck with an issue that causes my code to crash on iOS 8. It works fine on iOS 7 but for some odd reason crashes on iOS 8. I've debugged the code until I found out where it crashes... This is the function in which it crashes:
- (void)reloadData
{
NSLog(@"BPT:\nreloadData Start");
oldDelegate = tableView.delegate;
tableView.delegate = self;
NSLog(@"BPT:\ntable: %@", tableView);
NSLog(@"BPT:\nreloadData 1");
[tableView setEditing:YES animated:YES];
NSLog(@"BPT:\nreloadData End");
}
It crashes on:
[tableView setEditing:YES animated:YES];
Here is the log:
BPT:
reloadData Start
BPT:nreloadData 1
BPT:
table: <UITableView: 0x169f1800; frame = (0 0; 308 1024); autoresize = W+H; gestureRecognizers = <NSArray: 0x15d9b6c0>; layer = <CALayer: 0x15d9a260>; contentOffset: {0, -323.5}; contentSize: {308, 4255.5}>
BPT:
reloadData 1
Dec 2 22:09:35 ReportCrash[13733]...
This is the crash report: https://ghostbin.com/paste/2sq95
It shows that the application crashes when the code found at: 0x1654 in the dylib runs. But when I view this in IDA, this is what I find:
__text:0000172C sub_172C
__text:0000172C
__text:0000172C var_8 = -8
__text:0000172C var_4 = -4
__text:0000172C
__text:0000172C STR R12, [SP,#var_4]!
__text:00001730 LDR R12, =(off_46D8 - 0x173C)
__text:00001734 LDR R12, [PC,R12] ; off_46D8
__text:00001738 STR R12, [SP,#4+var_8]!
__text:0000173C LDR R12, =(unk_4000 - 0x1748)
__text:00001740 LDR PC, [PC,R12]
__text:00001740 ; End of function sub_172C
This function doesn't have any xrefs at all! It's not an initializer as well, cause the code initializes properly... Any help would be greatly appreciated... Why does: [tableView setEditing:YES animated:YES]; Cause a crash on iOS 8 and not iOS 7 Oo This error makes me crazy.