Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

EXC_BAD_ACCESS when property is not found #123

Merged
merged 1 commit into from

2 participants

@vojto

How to reproduce

Call method that is using propertiesNamed, for example findFirstWithAttribute:withValue: with nonexistent property. The reporting log message will cause EXC_BAD_ACCESS for trying to print out an integer using %@ which expects a pointer to an object.

Also, logging must be enabled.

Environment

Mac OS X 10.7

Notes

I used a subset of MagicalRecord that was copied over to RestKit. I looked at the source code for MagicalRecord and it seems to have the same issue. There's a slight chance it's a non-issue when using whole MagicalRecord library, but I don't think it is.

@magicalpanda magicalpanda merged commit fe59756 into magicalpanda:master
@magicalpanda

Thanks, good catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 29, 2011
  1. @vojto
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  Source/Categories/NSManagedObject+MagicalRecord.m
View
2  Source/Categories/NSManagedObject+MagicalRecord.m
@@ -113,7 +113,7 @@ + (NSArray *) MR_propertiesNamed:(NSArray *)properties
}
else
{
- MRLog(@"Property '%@' not found in %@ properties for %@", propertyName, [propDict count], NSStringFromClass(self));
+ MRLog(@"Property '%@' not found in %d properties for %@", propertyName, [propDict count], NSStringFromClass(self));
}
}
}
Something went wrong with that request. Please try again.