Fedyashov's Blog

Just another WordPress.com site

Tag Archives: crash dumps

Enabling automatic crash dump generation in case of an application fault

I composed this topic as I reminder for me and probably others who always forget all those registry paths.. See references at the bottom of the page.

So if you are using Windows Vista (or above) and have an application (let’s call it crash_me.exe) that crashes often and you want to generate crash dump in an unintended manner so that whenever it crashes – a dump is generated without user involvement – you’ll need to perform these two steps:

Step 1: Specify that a dump should be generated for your application by adding the following to the registry:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\crash_me.exe]

  • DumpFolder REG_EXPAND_SZ – directory to hold the dump files
  • DumpType REG_DWORD – Value: 2 (type of dump – full dump)

Step 2: Ensure that Windows Error Reporting UI is not shown by setting the following value (otherwise, crash dump generation won’t be performed until user selects anything in the “has stopped working” pop-up dialog):

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting]

  • DontShowUI REG_DWORD – Value: 1

UPDATE: If you’re on Windows 7 then Fault Tolerant Heap might create obstacles for your troubleshooting process. Next steps were added specifically to deal with FTH (taken from MSDN article on Fault Tolerant Heap):

Step 3: Disable FTH (requires reboot): set HKLM\Software\Microsoft\FTH\Enabled to 0

Step 4: Reset FTH mitigation configuration: Rundll32.exe fthsvc.dll,FthSysprepSpecialize

References:
- MSDN articles: Collecting User-Mode DumpsFault Tolerant Heap
- Codehead’s article How To Disable “X has stopped working” Popup In Windows Vista

Follow

Get every new post delivered to your Inbox.