• 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
Re: Return causes EXC_BAD_ACCESS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Return causes EXC_BAD_ACCESS


  • Subject: Re: Return causes EXC_BAD_ACCESS
  • From: "Mr. Gecko" <email@hidden>
  • Date: Thu, 28 Jul 2011 16:45:41 -0500

That makes lots of sense, never even expected that to happen. Adding a local variable and setting it to the value before releasing it and returning that variable fixes the issue. I am still looking to an link to explanation in detail as to why this happens. If it's as I said, then I do not think I need it.

On Jul 28, 2011, at 4:35 PM, Dave DeLong wrote:

> It kind of looks like foundCookieJar is an ivar, which means that "return foundCookieJar" is really going to be "return self->foundCookieJar".  Since you set "self" to "nil", you're trying to dereference a NULL pointer, which is a great way to crash your app.
>
> HTH,
>
> Dave
_______________________________________________

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: Return causes EXC_BAD_ACCESS
      • From: Dave DeLong <email@hidden>
    • Re: Return causes EXC_BAD_ACCESS
      • From: Kyle Sluder <email@hidden>
References: 
 >Return causes EXC_BAD_ACCESS (From: "Mr. Gecko" <email@hidden>)
 >Re: Return causes EXC_BAD_ACCESS (From: Dave DeLong <email@hidden>)

  • Prev by Date: Re: Return causes EXC_BAD_ACCESS
  • Next by Date: Re: Return causes EXC_BAD_ACCESS
  • Previous by thread: Re: Return causes EXC_BAD_ACCESS
  • Next by thread: Re: Return causes EXC_BAD_ACCESS
  • Index(es):
    • Date
    • Thread