Hey guys! I posted this question to StackOverflow as well, but I figured you might be able to beat them to the punch.
I'm working with an NSTableViewController, and I have a section of code as follows.
This code is in the UITableViewDataSource method that returns an UITableViewCell for an index path. (I'm sure you're all familiar with it.)
I'm noticing a strange bug where even though [subject name] is returning "Subject 16", the cell is actually being displayed with "Subject 11". I have no clue what's going on, I have placed breakpoints and used GDB to examine the code at that location. See the attached screenshots, the first is a breakpoint as I was scrolling to the last row, where the issue occurs. The second is after the code has executed, and the cell is being displayed. (This bug seems to occur to random rows, only one at a time, and it takes some random clicking, re-ordering, etc. to coax it out.)
Also, I'm wondering if there's maybe a memory issue, as indicated by the third screenshot. For some reason, the delete control isn't being displayed for the offending cell. Examining the object in GDB I can't seem to find any memory issues though.
Thanks guys!
Code:
Subject *subject = [[context subjects] objectAtIndex:[indexPath row]];
cell.textLabel.text = [subject name];
cell.showsReorderControl = YES;
return cell;
This code is in the UITableViewDataSource method that returns an UITableViewCell for an index path. (I'm sure you're all familiar with it.)
I'm noticing a strange bug where even though [subject name] is returning "Subject 16", the cell is actually being displayed with "Subject 11". I have no clue what's going on, I have placed breakpoints and used GDB to examine the code at that location. See the attached screenshots, the first is a breakpoint as I was scrolling to the last row, where the issue occurs. The second is after the code has executed, and the cell is being displayed. (This bug seems to occur to random rows, only one at a time, and it takes some random clicking, re-ordering, etc. to coax it out.)
Also, I'm wondering if there's maybe a memory issue, as indicated by the third screenshot. For some reason, the delete control isn't being displayed for the offending cell. Examining the object in GDB I can't seem to find any memory issues though.
Thanks guys!