Bad Access error in table view issue

Discussion in 'iOS Programming' started by luckylefty01, Jul 24, 2008.

  1. luckylefty01 macrumors member

    Apr 8, 2008
    Could anybody point me in the right direction as far as figuring out where this error is coming from?

    Program received signal: “EXC_BAD_ACCESS”.
    (gdb) bt
    #0 0x300c87ec in objc_msgSend ()
    #1 0x30aa1378 in -[UITableView(_UITableViewPrivate) _updateAnimationDidStop:finished:context:] ()
    #2 0x30a7b804 in -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] ()
    #3 0x30a7b96c in -[UIViewAnimationState animationDidStop:finished:] ()
    #4 0x31e935bc in run_animation_callbacks ()
    #5 0x31e933b4 in CATransactionTimerCallback ()
    #6 0x3025bff2 in CFRunLoopRunSpecific ()
    #7 0x3025b58a in CFRunLoopRunInMode ()
    #8 0x316998ec in GSEventRunModal ()
    #9 0x30a5e310 in -[UIApplication _run] ()
    #10 0x30a671e4 in UIApplicationMain ()
    #11 0x000020bc in main (argc=1, argv=0x2ffff5c8) at .../main.m:14

    It shows up on a semi-regular basis when I'm deleting rows from my table.

    This is the code I'm using to actually do the deleting:

    - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
      NSLog(@"DeleteCellAtRow: %i", indexPath.row);
      // Retain record so it doesn't get lost when array releases it
      Record *recordToMove = [[records objectAtIndex:indexPath.row] retain];
      if (editingStyle == UITableViewCellEditingStyleDelete) {
        [records removeObjectAtIndex:indexPath.row];
      [recordTable deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
      [webservice moveRecordWithName:recordToMove.username];
      [recordToMove release];
    Thanks for any help...I'm stumped!
  2. ayasin macrumors 6502

    Jun 26, 2008
    well that error usually means something is being over released. I can't tell from your snippit what that might be right off but one thing I did notice is that you delete always but only remove from the array on the delete action. Try running instruments and seeing if you can find any objects being over released.
  3. cruisercoder macrumors newbie

    May 11, 2009
    Hey LuckyLefty01, did you find out what this issue was? I'm having a similar issue.

Share This Page