We have a native C++ Win32 .exe built using Visual Studio 2005 that works flawlessly on all the machines we've tested in-house on (XP 32-bit, Vista 32-bit & Windows 7 64-bit). But of course, it crashes repeatedly on a client's 32-bit Vista machine.
Digging around on several websites I found tidbits that indicate if I ship the PDB files (vc80.pdb & projectName.pdb) along with the Release build of the executable to the customer, there is some way of generating minidumps when a crash occurs. I can then load the crash dump into Visual Studio and get a stack trace and some other useful information. Microsoft's Dr. Watson utility also seems to be involved in this process.
But I can't find any clear instructions on the steps to follow to make this happen
Can someone please describe this process?
Debug mode and Release mode are different configurations for building your . Net project. Programmers generally use the Debug mode for debugging step by step their . Net project and select the Release mode for the final build of Assembly file (.
When doing a DEBUG build the project is set up to not optimize (or only very lightly optimize) the generated code, and to tell the compiler to add debug information (which includes information about functions, variables, and other information needed for debugging).
Debug Mode: When we are developing the application. Release Mode: When we are going to production mode or deploying the application to the server.
We are able to get crash dumps from our Release builds out in the field and do not need to ship the pdb files with our product.
We build in calls to create the crash dump file ourselves in our top-level exception handler using MiniDumpWriteDump(). But even without that, you could have the user generate the crash file at the point of the crash using task manager as documented here: MSDN Instructions for creating dump file.
Once you have the dump file, the customer zips and mails it to you and you drop it onto Visual Studio. Within VS, you then pick Debug with Mixed or Debug with Native Only and it uses your local copy of the pdb files to show you the call stack, etc.
The process you should have looks like this:
Note:
I feel your pain. Had to do that a while ago.
Anyway, have you tried google Breakpad ?
Breakpad is a library and tool suite that allows you to distribute an application to users with compiler-provided debugging information removed, record crashes in compact "minidump" files, send them back to your server, and produce C and C++ stack traces from these minidumps. Breakpad can also write minidumps on request for programs that have not crashed.
Breakpad is currently used by Google Chrome, Firefox, Google Picasa, Camino, Google Earth, and other projects
You can find it here : http://code.google.com/p/google-breakpad/
It does the same things as the other answers mentioned, but it does it automatically, saviong you a lot of time and efforts
I did this some time ago and I think I followed this guide. If it doesn't work, check out the Windbg utility, I recall you don't need to install it, just copy and run, even from a USB stick
I wrote 2 articles on DDj about post mortem debugging, that might help you:
Postmortem Debugging http://drdobbs.com/tools/185300443
and Post-Mortem Debugging Revisited http://drdobbs.com/architecture-and-design/227900186
the second article contains source code to fill stack dumps from a client machine with symbolic information retrieved either from map or pdb files.
If your client is using Vista SP1 or higher, you can configure the system to generate a local dump file each time an application crashes. You can find the full documentation on the MSDN site.
You can keep all your PDBs private. Those are only needed when you actually analyze the dump file. If you want to keep track of the PDBs corresponding to the versions of the product you ship, you should strongly consider using a symbol server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With