Thanks, Mike, I figured it out. Xcode was hiding most of the stack, including
the bit that had the answer. I didn't realize this.
On Apr 5, 2012, at 10:25 , Mike Abdullah wrote:
> What's the backtrace of the crash?
>
> How's your +addOperationOnMainQueueWithBlock: method implemented?
>
> On 5 Apr 2012, at 01:09, Rick Mann wrote:
>
>> 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/cocoadev%40mikeabdullah.net
>>
>> This email sent to [email protected]
>
_______________________________________________
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]