Re: EXC_BAD_ACCESS mystery
Re: EXC_BAD_ACCESS mystery
- Subject: Re: EXC_BAD_ACCESS mystery
- From: Ryan Homer <email@hidden>
- Date: Tue, 10 Nov 2009 11:43:01 -0500
These might also be helpful:
http://www.cocoadev.com/index.pl?DebuggingTechniques (in particular see the "Breaking on Exceptions" section where they talk about objc_exception_throw)
http://chanson.livejournal.com/171198.html
Then, when you crash, bring up the Debugger (Cmd-Shift-Y). Sometimes you'll be able to go back a few steps into the method/line# in your code that caused the crash.
On 2009-11-10, at 11:21 AM, Jens Alfke wrote:
>
> On Nov 10, 2009, at 5:37 AM, Ian Piper wrote:
>
>> Can anyone advise a good strategy for tracking down EXC_BAD_ACCESS crashes? I have an application that I can run quite happily two out of three times. Then it will crash with this error. By this I mean I can do Build and Run successively with no problems and then it will crash - no code or other changes.
>
> That exception just means the CPU dereferenced a pointer to an invalid memory address; your average garden-variety crash. If you have earlier experience debugging native code on any other platform, it'll come in handy. Run with the debugger enabled and look at the backtrace when you crash. Find out what variable contains the bad pointer.
>
> If the crash is within the function objc_msgsend, what's happened is that something's called a method of an invalid (probably freed) object. There's a whole FAQ somewhere on this, titled something like "So, You've Crashed In objc_msgsend!".
>
> —Jens_______________________________________________
>
> 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
_______________________________________________
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