If you find a hang in an application, it is very useful for the developer to know where in the code this hang happens, especially if he or she can't reproduce it. Below are steps you can use to attach so-called "Samples" to bug reports.
Creating the sample
- When the application is still hung, open up Sampler.app (it's in your <tt>/Developer/Applications/Performance Tools/</tt> folder).
- Choose File > Attach...
- Select "firefox-bin" or the hung application you want a sample from.
- Now, click "Start recording". Note that only 3-4 seconds usually suffice, note that this will quickly hog up a lot of memory if you leave it on for too long!
- When it's done parsing the data, you should now have a couple of rows with stacktraces for all the threads in the sampled application.
Exporting it to a usable form
When you have the raw Sample data, you can't just save that and attach it to a bug, because the format is not very usable (unless the developer is a Mac hacker). Export it using Tools > Generate Report, and attach this as a text file to the bug report.
The final data will show where the application spent all its time when it was hung, and hopefully your bug will be easier to fix now!