Skip to content

crash in MR_deleteAllMatchingPredicate #441

bcyng opened this Issue Mar 30, 2013 · 1 comment

2 participants

bcyng commented Mar 30, 2013

will crash in NSManagedObject+MagicalRecord.m on the lines:

for (id objectToTruncate in objectsToTruncate) {
[objectToTruncate MR_deleteInContext:context];


  • (BOOL) MR_deleteAllMatchingPredicate:(NSPredicate *)predicate inContext:(NSManagedObjectContext *)context

should be changed to:
for (int i = 0; i < objectsToTruncate.count; i++) {
id objectToTruncate = [objectsToTruncate objectAtIndex:i];
[objectToTruncate MR_deleteInContext:context];

Intermittent crash here due to modifying immutable objectsToTruncate NSArray.
Making this change will stop that.


Given the age of this issue, and the volume of issues we have to work through, I've decided to close this alongside a number of other older issues.

If you can still replicate the issue under the latest in-development version of MagicalRecord (3.0 at the time of writing), please feel free to re-open and one of @magicalpanda/team-magicalrecord will take another look. Thanks!

@tonyarnold tonyarnold closed this Apr 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.