I have this in my tableView:cellForRowAtIndexPath:
if (condition) {
// make a custom cell
return cell; // line number 240
}
else {
// make another kind of cell
return cell; // line number 256
}
I got a EXC_BAD_ACCESS, so I fired up the debugger and set a breakpoint, stepping through the code line by line.
When I stepped forward “step over” from line number 256 it went directly to line 240, i.e. into another branch of the if statement. How is that possible???
Thanks a lot for your help,
Sascha
I think I found the solution. The view controller with the table view is also the delegate of a background web loading thread. Apparently the debugger can only step through one thread at a time. The delegate routine did indeed call a
scrollToRowAtIndexPath:without checking the abovecondition.Still, I find the behavior of the debugger a bit puzzling.