• 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: Help with debugger (mach_msg_trap) message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Help with debugger (mach_msg_trap) message (From: "McLaughlin, Michael P." <email@hidden>)
 >Re: Help with debugger (mach_msg_trap) message (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Release bigger than Debug
  • Next by Date: Newbie questions about XCode
  • Previous by thread: Re: Help with debugger (mach_msg_trap) message
  • Next by thread: gdb balks because "the malloc lock is held."
  • Index(es):
    • Date
    • Thread