title: Serious Application Error. This is usually a bug within an observer of NSManagedObjectContextObjectsDidChangeNotification. CoreData could not fulfill
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7280831/does-nsfetchedresultscontroller-observe-all-changes-to-persistent-store">Does NSFetchedResultsController Observe All Changes to Persistent Store?</a>  </p>
  </blockquote>
  
  
  
  <p>I am getting this Error:</p>
  
  <pre><code>Serious application error.  Exception was caught during Core Data change processing.    
  This is usually a bug within an observer of  
  NSManagedObjectContextObjectsDidChangeNotification.    
  CoreData could not fulfill a fault for [...]  with userInfo {
  NSAffectedObjectsErrorKey =     (
      "&lt;EntitySetsCards: 0x94664a0&gt; (entity: EntitySetsCards; id: 0x27bb70 
  [...] data: &lt;fault&gt;)"
  );
  </code></pre>
  
  <p><strong>This Error occurs, when i do changes in my EntitySetsCards.</strong><br>
  I have a TableView where i populate it with NSFetchedResultsController.<br>
  I choose a row of tableView and my DetailView gets loaded.<br>
  In Detailview i am iterating through the rows of the tableview. On return to tableview i am doing changes in my entitys:<br>
  <strong>EntitySetsCards</strong><br>
  <strong>EntitySetsCardsInbox</strong>  </p>
  
  <p>In both Entitys, i am updating a property.
  And here is the code, where the update happens:  </p>
  
  <pre><code>- (IBAction) actionBtnBack:(id) sender {
  
  
  //[self hideAllButtons];
  
  //diese variable führt zu absturz daher hier mal nil setzen als test
  detailCardsArray = nil;
  
  NSError *error = nil;
  
   //archived hier updaten auf 1!
  NSFetchRequest *fetchRequestARCHIV = [[[NSFetchRequest alloc] init] autorelease];
  NSEntityDescription *entityARCHIV = [NSEntityDescription entityForName:@"EntitySetsCards" inManagedObjectContext:managedObjectContext];
  [fetchRequestARCHIV setEntity:entityARCHIV];
  
  NSFetchRequest *fetchRequestINBOX = [[[NSFetchRequest alloc] init] autorelease];
  NSEntityDescription *entityINBOX = [NSEntityDescription entityForName:@"EntitySetsCardsInbox" inManagedObjectContext:managedObjectContext];
  [fetchRequestINBOX setEntity:entityINBOX];
  
  
  NSNumber *one = [[[NSNumber alloc] initWithInt:1] autorelease];
  
  
  NSMutableSet* existingCards = [NSMutableSet set];
  NSMutableArray *filteredArray3 = [[[NSMutableArray alloc] init] autorelease];
  
  for (id object in collectionOfCardIds) {
      if (![existingCards containsObject:object]) {
          [existingCards addObject:object];
          [filteredArray3 addObject:object];
      }
  }
  
  
  for (int i=0; i &lt;[filteredArray3 count]; i++) {
  
      NSPredicate *predicate = [NSPredicate predicateWithFormat:@"cardId == %@", [filteredArray3 objectAtIndex:i]];
      [fetchRequestARCHIV setPredicate:predicate];
  
  
      NSPredicate *predicateInb = [NSPredicate predicateWithFormat:@"cardId == %@", [filteredArray3 objectAtIndex:i]];
      [fetchRequestINBOX setPredicate:predicateInb];
  
      EntitySetsCards *entitySetsCards = [[managedObjectContext executeFetchRequest:fetchRequestARCHIV error:&amp;error] objectAtIndex:0];
      EntitySetsCardsInbox *entitySetsCardsInbox = [[managedObjectContext executeFetchRequest:fetchRequestINBOX error:&amp;error] objectAtIndex:0];
  
  
  
      entitySetsCards.archived = one;
      entitySetsCardsInbox.archived = one;
  
  
      [self.managedObjectContext save:&amp;error];
  
      if (![managedObjectContext save:&amp;error]) { 
          NSLog(@"Problem saving: %@", [error localizedDescription]); 
      }
  
  
  [self dismissModalViewControllerAnimated:YES];
  }
  </code></pre>