Re: Troubleshooting EXEC_BAD_ACCESS
Re: Troubleshooting EXEC_BAD_ACCESS
- Subject: Re: Troubleshooting EXEC_BAD_ACCESS
- From: Jens Alfke <email@hidden>
- Date: Sun, 18 Sep 2011 15:45:42 -0700
On Sep 18, 2011, at 12:24 PM, Todd wrote: Can anyone help me learn now to trouble shoot EXEC_BAD_ACCESS in the debugger?
This means the program tried to follow a pointer that leads to a nonexistent memory address. Most often this is from trying to use a NULL pointer, in which case the address will be 0 or something close to it; but it might also be from using a pointer with garbage data in it, i.e. uninitialized memory or something that wasn’t supposed to be a pointer.
In the debugger you should look at the values of variables involved (most likely fWindow since that’s the one that’s a pointer.) If you can’t tell whether it’s bogus or not, try entering “p *fWindow” at the (gdb) prompt, which will print the structure fWindow points to, or an error if it doesn’t point to valid memory.
Beyond that, you need to look at your code and figure out where the bogus value could have come from.
—Jens |
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden