• 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: What cause EXC_BAD_ACCESS?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What cause EXC_BAD_ACCESS?


  • Subject: Re: What cause EXC_BAD_ACCESS?
  • From: Jerry Krinock <email@hidden>
  • Date: Sun, 30 Sep 2007 07:50:54 -0700


On 2007 Sep, 30, at 7:26, Norio Ota wrote:

I'm sorry I'm a newbie of Cocoa so that I don't know if I can show you appropriate situation, but I'll try.

An EXC_BAD_ACCESS error comes only after my app reads my custom format type of data and reads document nib file.

Maybe someone else can, but I don't see anything wrong with the code you've posted. The problem may be in some code which you did not post.


EXC_BAD_ACCESS is usually caused by sending a message to an invalid pointer, or to an object which has been released. The quick and dirty way to find a reproducible problem like this is to add many NSLog(@"1234") statements to the suspect sections of code, run, and then study the code after the last NSLog that prints. (My life has been much more fun since I made a macro to do this.)

You should also look at NSEnumerator documentation and get into the habit of using this instead of for(;;;), (unless you are modifying the collection being enumerated). NSEnumerator is more convenient and conventional to use in Cocoa.
_______________________________________________


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


References: 
 >What cause EXC_BAD_ACCESS? (From: Norio Ota <email@hidden>)

  • Prev by Date: Programatically bind NSArrayController to NSManagedObjectContext?
  • Next by Date: Snippets repository
  • Previous by thread: What cause EXC_BAD_ACCESS?
  • Next by thread: Re: What cause EXC_BAD_ACCESS?
  • Index(es):
    • Date
    • Thread