Well, it is possible that you have your own objects, context, and threads. NSManagedObjectContextnot thread safe. To remove an object from the context, you must first transfer the object to the "context", and I assume that your managed object was extracted by another MOC. Without seeing more code, I can not say.
. for
for (ErgTimes *ergTimes in time){
NSMutableArray *temp = [[NSMutableArray alloc] initWithObjects:ergTimes.Twok, nil];
NSManagedObject *eventToDelete = [managedObjectContext objectWithID:[[temp objectAtIndex:0] objectID]];
[managedObjectContext deleteObject:eventToDelete];
}
, MOC, , objectID, .