Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

CodeBreaker

macrumors 6502
Original poster
Nov 5, 2010
494
1
Sea of Tranquility
Hi, I have an navigation app I created which is similar to the "Locations" example in the documentation. My app was working fine on Xcode 4.1/iOS 4.3.
But since the 4.2 update, it crashes with the following message:
Code:
Invalid table view update.  The application has requested an update to the table view that is inconsistent with the state provided by the data source.

The Locations example too crashes with the same error. Any ideas?

I have just installed the updates, didn't change any of my apps.
 
Last edited:
I haven't seen this but it's likely to occur inside a beginUpdates/endUpdates block if there is some inconsistency between the number of rows and sections reported by your callbacks and the adds/deletes that you do inside the beginUpdates/endUpdates block.

If it's not occurring there then you should try to figure out what method causes the error and log the output from the number of rows and sections callbacks.
 
I haven't seen this but it's likely to occur inside a beginUpdates/endUpdates block if there is some inconsistency between the number of rows and sections reported by your callbacks and the adds/deletes that you do inside the beginUpdates/endUpdates block.

If it's not occurring there then you should try to figure out what method causes the error and log the output from the number of rows and sections callbacks.

Thanks for your help :). Logging always helps. I fixed it and I'm quite embarrassed to talk about it. :eek: But still:

I am using Core Data for persistence. In my app, I store all the CoreData model objects in an array, in the usual form: perform fetch when the app loads and save context when changes are made.

I was half way through the app, and was just figuring out saving the context after an UI action. The problem was I never initialised my array in viewDidLoad, as I was going to populate it from the Core Data store later on. A simple alloc-init fixed it.
So, well, I suck :(
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.