Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8320893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:49:28+00:00 2026-06-08T22:49:28+00:00

I have an app which uses a table view to display a list of

  • 0

I have an app which uses a table view to display a list of items form my core data. I am using a remote api and I am updating my content after pulling down the table view – this triggers a call to the API.

Data is retrieved, parsed and inserted/updated into my Core Data.

I am sometimes getting an error after saving my Core Data context… Note that I’m not using multiple threads for this and like I said it doesn’t seem to always happen.

I am literally going quite mad. It seems this guy has a similar issue but I’m still unable to fix mine with his solution:
CoreData error driving me crazy… CoreData: Serious application error. An exception caught from delegate of NSFetchedResultsController

Here is the full error:

2012-07-31 14:14:47.332 MyApp[2893:11303] 
*** Assertion failure in -[_UITableViewUpdateSupport _setupAnimationsForNewlyInsertedCells], 
/SourceCache/UIKit_Sim/UIKit-1914.84/UITableViewSupport.m:1133
2012-07-31 14:14:47.332 MyApp[2893:11303] CoreData: error: Serious application error.  
An exception was caught from the delegate of NSFetchedResultsController during a call to -
controllerDidChangeContent:.  
Attempt to create two animations for cell with userInfo (null)

UPDATE:

I have a predicate on my fetch request. In order to seem to be deleting objects previously downloaded from API and which are missing from the new JSON result. I am setting a hideFromUser flag, this is saved in my Core Data.

If this flag is YES then it doesn’t appear in the table view. But if it’s ok then it does. I am also updating info on that managed object should anything be changed. Is it possible that I have an object which was previously set to hide… and is now set to show, and it also had some new data, could this possible trigger a “cell should update” and a “cell should insert” ?

More I think about it less it seems to be relevant.

Here is how I am updating my data:

1) I set all relevant objects of the corresponding type to “hide form user” (NSPredicate ensures they don’t show in Table View).

2) I get an NSArray from the JSON data.

3) Looping each item, my createABookOfClass:withJSON: method queries the core data for a book (using an ID from the json dictionary), if it doesn’t find it, it creates a new one. Note: at this point the “hide from user flag” is reverted.

4) After all is done, I save.

[[DPLocalStore getInstance] hideFlagItemsOfType:NSStringFromClass([MyFavouriteBook class])];

NSArray * itemsJSON = [data mutableObjectFromJSONData];

[itemsJSON enumerateObjectsUsingBlock:^(NSDictionary *obj, NSUInteger idx, BOOL *stop) {     
    [[DPLocalStore getInstance] createABookOfClass:[MyFavouriteBook class]
                                          withJSON:obj];
}];

NSError *error = nil;
BOOL didsave = [[DPLocalStore getInstance] save:&error];

Maybe what is happening is a cell containing Object A has been updated, it’s update: the hide flag has changed. thus I am getting into a situation where the NSFetchedResultsController’s delegate wants to update that cell, and delete it also… since the predicate now doesn’t correspond to this object… That sound very likely…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T22:49:30+00:00Added an answer on June 8, 2026 at 10:49 pm

    I think I may have found the error, since I changed it I haven’t experienced the problem so I am assuming that it’s ok.

    In my implementation of controller:didChangeObject:atIndexPath:forChangeType:newIndexPath: I had this in the switch statement for NSFetchedResultsChangeMove:

    case NSFetchedResultsChangeMove:
        [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath]
                         withRowAnimation:UITableViewRowAnimationFade];
    
        // Reloading the section inserts a new row and ensures that titles are updated appropriately.
        [tableView reloadSections:[NSIndexSet indexSetWithIndex:newIndexPath.section]
                 withRowAnimation:UITableViewRowAnimationFade];
        break;
    

    As it was used in an older project (which I was not part of), I assumed the entire controller:didChangeObject:atIndexPath:forChangeType:newIndexPath: implementation was okay, since this really is more of a template rather then something you will do anything customised.

    In consequence I didn’t pay much attention to it until I was reading up about it again on the Apple developer site. And I noticed, in case of a NSFetchedResultsChangeMove you must delete a cell, and insert the cell at the new path. Yet I had implemented without really realising – delete the cell and reload the section !

    In effect I should and now have the following:

    case NSFetchedResultsChangeMove:
        [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath]
                         withRowAnimation:UITableViewRowAnimationFade];
        [tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath]
                         withRowAnimation:UITableViewRowAnimationFade];
        break;
    

    Like I said I’ve not had a problem since. Would love to know from anyone what inner workings would be responsible for this – the exception having been “Attempt to create two animations for cell”.

    Thanks for any interest.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have started creating an app which uses a core data stack at the
I have an iPhone/iPad app which uses Core Data. In my DB I have
I've been writing a small Facebook app which uses the unified_thread table using FQL.
I have a navigation based app that uses Core Data for storage. The schema
I have an app which uses a keyboard hook procedure in a library. The
I have implemented an App which uses SQLite database, now if I run the
I have made an app which uses DropBox SDK for iPhone to connect to
I have a Django app which uses LDAP as the authentication backend. I'm not
I have a Silverlight web app which uses ASP.net Website administration tool for user
I have made a layout for my app which uses a lot of activities.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.