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

  • SEARCH
  • Home
  • 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 8568207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:03:36+00:00 2026-06-11T18:03:36+00:00

I have a single managed document in my entire application (with two entities) that

  • 0

I have a single managed document in my entire application (with two entities) that the user is able to update from two different view controllers. Each view controller has its own NSFetchedResultsController property to relay changes to: a UICollectionView in one view controller, and a UITableView in the other. The UICollectionView in the root view controller displays Teams, while the UITableView in the segued view controller displays Players on that team.

When I am in the first view controller, I can add instances of a Team and it works fine as it saves them to the document and then adds them to the UICollectionView. When I am in the second view controller, I make a Player insertion into CoreData and call:

[document saveToURL:document.fileURL forSaveOperation:UIDocumentSaveForOverwriting     completionHandler:nil]; 

This correctly invokes the NSFetchedResultsControllerDelegate method:
-(void)controller:didChangeObject:atIndexPath:forChangeType:newIndexPath:

In this delegate method, I call:

[self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];

However, calling this row insertion method on the table view causes the following Core Data error:

“CoreData: error: Serious application error. Exception was caught during Core Data change processing. This is usually a bug within an observer of NSManagedObjectContextObjectsDidChangeNotification. * -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0] with userInfo (null)”

My fetchedResultsController certainly is an observer of NSManagedObjectContextObjectsDidChangeNotification, but this error is occurring before any changes in the managed object context. So I am basically unable to determine at which point the managed object context is getting null userInfo.

(Another thing that happens is that my NSFetchedResultsController from the root view controller, which has the UICollectionView, fires its delegate method right before the NSFetchedResultsController in the next view controller, which has the UITableView, fires its own. I think this is correct functionality, as both the Team and the Player are getting updates in CoreData).

Any thoughts on why the UITableView row insertion is causing this error, or how my single managed document could have inconsistencies that might cause this?

  • 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-11T18:03:38+00:00Added an answer on June 11, 2026 at 6:03 pm

    In the case of a NSFetchedResultsChangeInsert event, indexPath is nil and newIndexPath is the destination path for the inserted object. Therefore you have to call

    [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath]
                          withRowAnimation:UITableViewRowAnimationAutomatic];
    

    for an update event.

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

Sidebar

Related Questions

I have a single-view application that takes in a username and a password and
I have a single-threaded application that uses 3 SQLite databases in 3 different files
I have a single view application. It has myAppDelegate and myViewController. In a earlier
Currently I have tasked to prepare Document service for client side parser that user
I have a non document-based Core Data application. There's an NSTreeController that manages a
I have an application (writted using Delphi 2009) that allows a user to run
I have a single un-managed C++ console-app solution (.sln) with two projects (.vcproj) both
I'm new to managed C++. I have two managed C++ projects in a single
I'm currently managing multiple models from a single SITE MANAGER page. I have the
I have A single page that has the following structure <form runat=server><placeholder></placeholder></form> I have

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.