• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Help debugging EXC_BAD_ACCESS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Help debugging EXC_BAD_ACCESS
      • From: Mike Abdullah <email@hidden>
  • Prev by Date: Re: Using NSView fullscreen mode vs. autolayout constraints
  • Next by Date: Fielding a mouseDown in a textField
  • Previous by thread: Re: Core Data migration, what to do when adding the nth version of your model?
  • Next by thread: Re: Help debugging EXC_BAD_ACCESS
  • Index(es):
    • Date
    • Thread