Corrupt relationships, missing objects when using Core Data with iCloud

Originator:atomicbird
Number:rdar://13119691 Date Originated:30-Jan-2013 04:23 PM
Status:Open Resolved:
Product:iCloud Product Version:Mac OS X 10.8.2
Classification:Serious Bug Reproducible:Always
 
[Note, this has been redacted pretty heavily from the actual bug report due to confidentiality issues.]

30-Jan-2013 04:23 PM Tom Harrington:
Summary:

Core Data relationships are corrupted and instances are missing when received from iCloud.

Steps to Reproduce:

Build an app that uses Core Data's iCloud support, and sync a bunch of data from one Mac to another.

Expected Results:

Instances on the receiving end would
a. Exist, as long as they continue to do so on the originating Mac
b. Have the same relationships as on the originating Mac.

Actual Results:

In many cases,

a. Some instances are never received, though they continue to exist on the originating Mac.
b. For instances that are received, relationships are frequently corrupted-- in the sense that a relationship on one instance leads to a different instance than the one found on the originating Mac.


[detailed example redacted]


To put the above in context:

The errors were detected on the receiving Mac at the first reading of the incoming iCloud data. The objects were saved on one Mac, and found to be corrupt on the receiving Mac the first time they were inspected, when no changes had been made on that Mac.

This does not affect every instance of the entities. Approximately 3-5% of instances of affected entity types exhibit this problem. [detailed analysis redacted].

This seems to present an insurmountable barrier to using Core Data with iCloud in this app. I have devised a potential workaround that would make it possible to fix the broken relationships. The missing instances, however, are not so easily fixed. I don't know why those instances were not received so I don't know if there's some way to force the issue.


Regression:

None

Notes:

I have collected every relevant file I can think of. Together they're too large to attach (Radar web limits uploads to 50MB). You can download them from [redacted].

The archive contains the following, for both Macs:
- Data stores (external references have been deleted in the interest of space)
- Ubiquity folders for the app
- All ubiquity logs for the day when the test was run, with log level 7.

Comments


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!