If you have a predicate that has results but a postFetchFilterTest that removes them all, and then save a new managed object that does match the filter test, it crashes. It appears to be an issue with how the sections handle no objects, possibly the sorted section logic, it ends up calling didChangeSection with an NSNotFound sectionIndex.
WiFiFoFum-Passwords[29459:8411491] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 9223372036854775807 beyond bounds for empty array'
*** First throw call stack:
(
0 CoreFoundation 0x000000010dc57c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010d262bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010db4e17e -[__NSArrayI objectAtIndex:] + 190
3 WiFiFoFum-Passwords 0x000000010cc66d13 -[BSFetchedResultsController updateObjects:] + 1571
4 WiFiFoFum-Passwords 0x000000010cc63f04 __58-[BSFetchedResultsController registerNotificationHandlers]_block_invoke + 772
5 Foundation 0x000000010cdd53b1 -[__NSObserver _doit:] + 291
6 CoreFoundation 0x000000010dc2754c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
7 CoreFoundation 0x000000010db25a04 _CFXNotificationPost + 2484
8 Foundation 0x000000010cdb8968 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
9 CoreData 0x000000010d55babe -[NSManagedObjectContext(_NSInternalChangeProcessing) _createAndPostChangeNotification:withDeletions:withUpdates:withRefreshes:] + 334
10 CoreData 0x000000010d4ca791 -[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:] + 2897
11 CoreData 0x000000010d4ce0f3 -[NSManagedObjectContext save:] + 131