CoreData: Managed objects lose attribute values after store migration

Originator:frank.illenberger
Number:rdar://15925197 Date Originated:28-Jan-2014 05:36 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 5.0.2, OS X 10.9.1
Classification:Serious Problem Reproducible:Always
 
The test code is available under: https://github.com/depth42/CoreDataStoreMigrationTest

Summary:
Attribute values of managed objects fetched before a store migration cannot be accessed anymore after the original store instance has been released.

Steps to Reproduce:
- Build and run the project CoreDataStoreMigrationTest with Xcode 5.0 under Mac OS 10.9.1
- Check the run log

Expected Results:
There should be no output from failed assertions in the run log.

Actual Results:
The run log contains output like this:

2014-01-28 17:29:30.574 CoreDataStoreMigrationTest[78253:303] *** Assertion failure in void runTest()(), CoreDataStoreMigrationTest/main.m:69
2014-01-28 17:29:30.575 CoreDataStoreMigrationTest[78253:303] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Person name is lost after store migration!'

Comments

OK, I've just realized that my test case fails because of the managed object context being released by the autorelease pool. So this test case does not reproduce the actual bug I am seeing in our application. I will keep trying to produce a proper test case.

By frank.illenberger at Feb. 5, 2014, 8:14 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!