I feel I should elaborate on the previous post, so I am going to describe how to install and configure WinDbg so you can "try this at home". I am only doing this on a Windows XP machine, so if you are using a different platform/version, your mileage may vary.

First, install the Windows Symbol Package required for your operating system. I am using XP SP2, so I chose this Symbol Package.

Then install the Debugging Tools. Since I am using Windows XP on a 32-bit architecture (x86), I chose this package.

Install both the symbols package and the Debug Tools package. Restart if requested.

1.) Start > (All) Programs > Debugging Tools for Windows > WinDbg
2.) Press Control+S (or File > Symbol File Path) to bring up the "Symbol Search Path" dialog
3.) Enter the path you chose when you installed the symbol package (by default, it is C:\windows\symbols). Close WinDbg. If you are asked to save workspace "base", tell it not to ask again, and choose Yes.
4.) Download NTCrash2.zip and extract NTCrash2.exe out of the 'release' folder in the zip, and store it on your desktop (or wherever you like).
5.) Configure your recovery options as directed below:
5a) Right-click "My Computer", > Properties > Advanced tab > Startup and Recovery > Settings (see Figure 1)

Figure 1:
System Properties screenshot - Figure 1

5b) Under the "System Failure" group box, checkmark all three checkmarks (Write an event, Send an alert, Automatically restart) if not checked already. In the "Write debugging information" sub-group box, change the drop down box to "Small memory dump (64KB)" and ensure that the "Small dump directory" is set to "%SystemRoot%\Minidump" (without the quotation marks) (see Figure 2)

Figure 2:
Minidump settings screenshot - Figure 2

At this point, you should navigate to the minidump folder under the Windows folder of your system drive, and delete all of the files in there. (e.g., Start > Run > %SystemRoot%\Minidump)

Note: When you are done with this experiment, you should disable the "Automatically restart" checkmark in the "System Failure" group box. This way, if you get an actual fatal error, you will be able to see the STOP error code. We want it to automatically restart for this experiment for convenience (so that you do not have to hold the power button to turn your machine all the way off when we make it crash).

With all of these settings and tools in place, we are ready to begin. Close any open windows or dialogs, and double click NTCrash2.exe. Wait until your system reboots itself (crashes). If your system reboots itself, Windows will most likely want to send an error report when you return to Windows again. Do not send the error report (but if you do send it, Microsoft will probably tell you there was a fault caused by a device driver or service, or similar).

After the crash, launch WinDbg. Press Control+D (or File > Open Crash Dump…) and nagivate your way to C:\Windows\minidump (or wherever your Windows directory is. You can even type "%SystemRoot%\Minidump" in the file name box to jump directly to it). Select the minidump file. A bunch of nerd words will appear in a new sub-window. At the bottom is a command prompt area. You should type "!analyze -v" to get a stack dump. You'll probably see a file name or two that belongs to the service or driver that crashed when NTCrash2.exe was pounding it. The very first time I experimented with this whole procedure, I had Daemon tools 3.47 installed. I had known that the D-Tools service is called d347bus because it asks you for a name when you install it (and I left it the default name). d347bus was listed as the offending file when I analyzed the crash dump. Immediately thereafter, I downloaded and installed Daemon Tools 4.0 (be sure to uncheck the "DAEMON Tools Search Bar" when you install it – it's ad-supported (it's not malware or spyware, however). After I installed D-Tools 4, I was unable to make the system crash ever again.

As ToastyX has told me, input validation is a very basic, but commonly overlooked, programming procedure. It's the first thing your program should do! You can't just accept garbage from anywhere and then just allow Windows to throw an exception over it. Thankfully, the Daemon Tools team corrected the problem in the 4.0 release. I also noticed that most machines that have Symantec products installed (such as Norton Internet Security 2005) blow up when NTCrash2 pounds on them. I don't recall the exact filename, but it was one of the many, many services that gets installed when you use Symantec/Norton products.