Note that there are some explanatory texts on larger screens.

plurals
  1. POUITableView crashes on iPhone when scroll down
    primarykey
    data
    text
    <p>I am developing a <code>tableView</code> which is crashing when I execute it in my iPhone and I don't know why is this happening. In the simulator works fine. However, in the iPhone, the scroll is not fluid and smooth. When I scroll down just hiding the first row, it crashes and exits the app.</p> <p>I found this lines in the Organizer console:</p> <pre><code>Sat Oct 15 23:22:54 unknown ReportCrash[33018] &lt;Notice&gt;: Formulating crash report for process MyApp[33017] Sat Oct 15 23:22:55 unknown com.apple.launchd[1] &lt;Warning&gt;: (UIKitApplication:WAY.MyApp[0xf392]) Job appears to have crashed: Bus error Sat Oct 15 23:22:55 unknown SpringBoard[31481] &lt;Warning&gt;: Application 'MyApp' exited abnormally with signal 10: Bus error Sat Oct 15 23:22:55 unknown ReportCrash[33018] &lt;Error&gt;: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/MyApp_2011-10-15-232254_iPhone-de-Ibai.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0 </code></pre> <p>Any idea? I've tried setting the rows to 0 and it works fine. Then tried with 1 row and it starts crashing again. I also tried to leave the row empty - doing "nothing" in <code>tableView:cellForRowAtIndexPath</code> - with no info to see if reading data was the problem.</p> <p>If this log is not helping, could you tell me which methods are called when scroll down? I thought it was only <code>tableview:cellForRowAtIndexPath:</code></p> <p>Thank you!</p> <p><strong>EDIT:</strong></p> <p>The <code>tableView:cellForRowAtIndexPath</code> is:</p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"ContactsCell"; ContactsCell *cell = (ContactsCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if(cell==nil){ NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"ContactsCell" owner:self options:nil]; for(id currentObject in topLevelObjects){ if([currentObject isKindOfClass:[UITableViewCell class]]){ cell = (ContactsCell *) currentObject; break; } } } // Configure the cell... Person *persona =[contactsArray objectAtIndex:indexPath.row]; //Introducimos en la celda los datos. [cell setCellNames:[persona name]]; [cell setCellStates:@"En Donosti"]; UIImage *contactImage = [UIImage imageWithData:[persona pic]]; if(contactImage != nil) [cell setCellPics:contactImage]; return cell; } </code></pre> <p>Doing some debug with <code>NSLog</code>s, the app stops working when calling the <code>[table reload]</code> (And I think that's the method which is calling when I scroll down).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload