Hosted Forums => foobar2000 => Development - (fb2k) => Topic started by: Peter on 2009-11-19 13:15:53

Title: Getting useful information out of crash reports
Post by: Peter on 2009-11-19 13:15:53
Preparing your component for a public release

You are not special. You are not a beautiful or unique snowflake. You're the same decaying organic matter as everything else. - Tyler Durden

Your components will crash. Not necessarily because you have done something wrong. Submitted crash reports will demonstrate failure scenarios you would have no idea about otherwise, and additionally if your code is popular enough, you'll get your own share of reports triggered by broken hardware.
To keep the development process as comfortable as possible for you (less effort required to analyze crash reports) and your userbase (faster bug fixes), you should take appropriate steps before releasing your component to the general public.

1. Enable debug information in release builds of your components.
Having matching debug information files (.pdb) will greatly increase the usefulness of minidump (.dmp) files included with crash reports, essentially taking you straight to the code line where the problem manifested itself, instead of having you go through assembly code.
This will not bloat size of your binaries, only increase it by a few kilobytes, including a reference to your debug information file name. You do not need to distribute the large .pdb files with your component.
You need to enable debug information in both C/C++ / Debug Information Format and Linker / Debugging / Generate Debug Info.
You might want to generate a few test crashes yourself to see if opening the created minidump takes you straight to the crashing code line.

2. Archive binaries and PDB files for every version you release publicly so submitted crash reports can be easily analyzed.

3. Use call path tracking macros around critical function calls.
Read more... (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Call_tracking_macros)

More useful information on minidump file usage: http://www.codeproject.com/KB/debug/postmo...tandalone1.aspx (http://www.codeproject.com/KB/debug/postmortemdebug_standalone1.aspx)

My component has been released, now what?

If your component appears on the online troubleshooter, this means that crash reports can be made available to you on request. Contact me or another forum staff member to obtain them. In some cases you will be contacted preemptively before the component is put on the troubleshooter.