2

i have this strange error : wait_fences: failed to receive reply: 10004003 in this code :

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {

    if (buttonIndex==0) {
        [self showActivityViewer];
        [NSTimer scheduledTimerWithTimeInterval:6.0 target:self selector:@selector(hideActivityViewer) userInfo:nil repeats:NO];
        [self downloadControlAndUpdatePoi];
        [self downloadControlAndUpdateItinerari];
        [self downloadControlAndUpdateEventi];
        [self downloadControlAndUpdateArtisti];
        NSLog(@"AGGIORNA");
    } else {
        NSLog(@"NON AGGIORNARE");
        return;
    }
}

Why?? Where could be the possibile error or problem??

EmptyStack
  • 51,274
  • 23
  • 147
  • 178
Andrea Mario Lufino
  • 7,921
  • 12
  • 47
  • 78

1 Answers1

9

This happens if you try to push/present another view controller before the alert view is actually dismissed. This happened when I ran one of my apps in iOS 4. I don't know the exact reason for this problem, but you can resolve this by moving all the code from clickedButtonAtIndex: method to didDismissWithButtonIndex: method.

EmptyStack
  • 51,274
  • 23
  • 147
  • 178