Re: What cause EXC_BAD_ACCESS?
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