Infinite recursion crash with duplication in -[NSFetchRequest propertiesToFetch]
| Originator: | rix.rob | ||
| Number: | rdar://14568695 | Date Originated: | 27-Jul-2013 10:35 AM |
| Status: | Open | Resolved: | |
| Product: | iPhone SDK | Product Version: | iOS SDK 6.1+ |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: Fetch requests with duplicate entries in propertiesToFetch (duplicate by property name) causes Core Data to crash. Steps to Reproduce: 1. Make a fetch request over some entity. 2. Set its result type to dictionary. 3. Set propertiesToFetch to an array containing two copies of the name of some property on the entity, or two NSExpressionDescription objects with the same name, etc. 4. Execute the fetch request. Expected Results: I expected an exception when setting properties to fetch, or at least when executing the fetch request. You clearly can’t have >1 entry in a dictionary with the same key without having it e.g. make an array of the values and I don’t think that’s at all reasonable, so an exception would be warranted. Actual Results: It actually just infinite loops and crashes instead. I have a project reproducing the crash which I will attach after posting. Regression: Did not test with earlier versions of the iOS SDK than 6.1. Did not test with OS X SDK. Suspect both have same bug. Notes: Occurs at a minimum with 6.1 and 7.0 b3.
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!