Fetched results controller causes an exception to be raised when changing an entity which is included in the fetched objects by an "ANY IN" predicate.

Originator:kyle
Number:rdar://16838159 Date Originated:07/05/2014
Status:open Resolved:
Product:CoreData.framework Product Version:iOS 6 to iOS 7.1.1
Classification:Bug Reproducible:Always
 
Steps to Reproduce:
1. Created a fetched results controller, perform a fetch with an entity by using a predicate with `ANY x IN <set of related x objects>`.
2. Edit an object in the results, then save the managed object context

(You can reproduce this by hitting build and run example project and then hit "Edit").

Expected Results:
No exception to be raised

Actual Results:
An exception was raised:

2014-05-07 13:05:44.143 FRPIssues[9270:60b] CoreData: error: Serious application error.  Exception was caught during Core Data change processing.  This is usually a bug within an observer of NSManagedObjectContextObjectsDidChangeNotification.  The left hand side for an ALL or ANY operator must be either an NSArray or an NSSet. with userInfo (null)
2014-05-07 13:05:44.146 FRPIssues[9270:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'The left hand side for an ALL or ANY operator must be either an NSArray or an NSSet.'
*** First throw call stack:
(
	0   CoreFoundation                      0x01b561e4 __exceptionPreprocess + 180
	1   libobjc.A.dylib                     0x018d58e5 objc_exception_throw + 44
	2   Foundation                          0x01559816 -[NSPredicateOperator performOperationUsingObject:andObject:] + 946
	3   Foundation                          0x01559324 -[NSComparisonPredicate evaluateWithObject:substitutionVariables:] + 347
	4   Foundation                          0x015591c1 -[NSPredicate evaluateWithObject:] + 48
	5   CoreData                            0x0035f821 -[NSFetchedResultsController(PrivateMethods) _objectInResults:] + 113
	6   CoreData                            0x00361152 -[NSFetchedResultsController(PrivateMethods) _preprocessUpdatedObjects:insertsInfo:deletesInfo:updatesInfo:sectionsWithDeletes:newSectionNames:treatAsRefreshes:] + 642
	7   CoreData                            0x00362435 -[NSFetchedResultsController(PrivateMethods) _managedObjectContextDidChange:] + 1557
	8   Foundation                          0x015a8049 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke + 40
	9   CoreFoundation                      0x01bb1f04 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
	10  CoreFoundation                      0x01b09efb _CFXNotificationPost + 2859
	11  Foundation                          0x014e1e41 -[NSNotificationCenter postNotificationName:object:userInfo:] + 98
	12  CoreData                            0x00265a13 -[NSManagedObjectContext(_NSInternalNotificationHandling) _postObjectsDidChangeNotificationWithUserInfo:] + 83
	13  CoreData                            0x00304faf -[NSManagedObjectContext(_NSInternalChangeProcessing) _createAndPostChangeNotification:withDeletions:withUpdates:withRefreshes:] + 367
	14  CoreData                            0x00260eb8 -[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:] + 2152
	15  CoreData                            0x002642fc -[NSManagedObjectContext save:] + 140
	16  FRPIssues                           0x00002b83 -[KFPFetchedTableViewController editEntity] + 371
	17  FRPIssues                           0x000029fd -

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!