Re: Help with debugger (mach_msg_trap) message
Re: Help with debugger (mach_msg_trap) message
- Subject: Re: Help with debugger (mach_msg_trap) message
- From: Ken Thomases <email@hidden>
- Date: Wed, 3 Feb 2010 02:32:20 -0600
On Feb 2, 2010, at 10:09 AM, Jens Alfke wrote:
> On Feb 2, 2010, at 7:36 AM, McLaughlin, Michael P. wrote:
>
>> The Debugger window shows the calling stack at the top of which is
>>
>> 0 mach_msg_trap
>> 1 mach_msg
>> 2 CFRunLoopRunSpecific
>> etc.
>
> This is showing the main thread, which is just paused waiting for events. The crash is on a different thread, but Xcode 3.1 often doesn't switch to the thread that crashed. You'll need to use the thread pop-up to switch between the different threads to see which one actually has a crash. (Any other threads that are in mach_msg_trap or in various functions having to do with locks or semaphores are also just idling.)
>
> Another way to find the crashed thread is to type "thread apply all bt" at the "(gdb)" prompt, which will dump a backtrace of every thread.
If you launch the program using the debugger from the start, rather than relying on "Auto-attach debugger on crash", then the debugger has a much better chance of showing you the thread in question right away. When it auto-attaches, it's a bit after the fact, and doesn't have all the information it would want to show you what happened.
Cheers,
Ken
_______________________________________________
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