For Developers: How to Get Crash Reports on Win9x/2000

My article on XP’s Windows Error Reporting system for O’Reilly’s was targeted towards end-users, so a developer section on how to get crash reports on non-XP systems didn’t really fit. Still, it’s interesting for developers, so here is the section that was cut. For background, please refer to the published article.

Crash Reports on non-XP Systems
WER was introduced with Windows XP, and also runs on Windows Server 2003. The system files that implement WER are not redistributable because they rely on kernel and global exception handling code that is specific to XP. Microsoft will support WER on future versions of Windows, but has no plans to retrofit it for older versions. The reason that Office XP and Explorer can produce crash reports on back versions of Windows is that they use a custom crash report system that pre-dates WER.

Developers writing for older operating systems can’t use WER for crash reports, but they can use an elegant replacement called XCrashReport, written by software consultant Hans Dietrich. XCrashReport was published on Code Project in a series of four articles. The first article describes how to find bugs using release-mode crash reports. The second and third describe some additional techniques. The fourth article contains the utility for generating crash reports and prompting users to send them back to the developer:

XCrashReport uses a redistributable, backward-compatible XP library called dbghelp.dll to produce mini-dumps. It also captures exception information, register values, stack data, and a list of the modules loaded at the time of the crash (all data that WER collects as well). Programmers can optionally add to the report any registry keys that might help diagnose the cause of the crash. End-users can review the contents of the error report files before deciding whether to submit them.

If the user agrees to send the crash report, the files are zipped up and sent through unencrypted email directly to the software developer. They are not added to the WER database on Microsoft’s server. Some end-users may feel more comfortable sending the files directly to the programmer, but as you’ll see in the next section, there are some compelling advantages for both the end-user and developer to using Microsoft’s tightly protected, carefully monitored, and usefully organized central repository.

XCrashReport isn’t suitable for use with programs that have a large user base since the number of XCrashReport emails that a company receives could quickly become overwhelming. But for small developers writing software for pre-XP versions of Windows, XCrashReport is a good solution. Also, shareware developers operating on a budget will be relieved at not having to purchase a VeriSign ID (a requirement for accessing the WER system).

Leave a Reply

Your email address will not be published. Required fields are marked *