Help debugging EXC_BAD_ACCESS
Help debugging EXC_BAD_ACCESS
- Subject: Help debugging EXC_BAD_ACCESS
- From: Rick Mann <email@hidden>
- Date: Wed, 04 Apr 2012 17:09:00 -0700
This is odd. I have an app that downloads locations from a web service, and creates NSManagedObejct (subclass: Location) for them. It's been working fine on simulator and device. Suddenly, I get a consistent EXC_BAD_ACCESS on device and simulator every time I create a new location (existing locations in the store work fine.
Here's the code snippet:
[NSOperationQueue addOperationOnMainQueueWithBlock:
^{
for (NSDictionary* locD in locs)
{
NSNumber* woeID = [locD valueForKey: @"woeid"];
Location* loc = [Location locationWithId: woeID inMOC: inMOC];
loc.temp = [locD valueForKey: @"temp"];
NSString* s = [locD valueForKey: @"photoURI"];
loc.photoURI = s;
The line that gets the error is the last line. Thread 1: EXC_BAD_ACCESS (code=1, address=0x8).
po loc and po s both work. photoURI is a simple dynamic property on Location, type NSString. The other property, temp, is NSNumber, and always executes fine.
Any ideas? I don't really even know what to check for. ARC, 5.1, Xc4.3.2
Thanks!
--
Rick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden