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 protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to