Investigate if it is possible to use `WerRegisterRuntimeExceptionModule` to capture locally minidumps generated by WER
Categories
(Toolkit :: Crash Reporting, task, P1)
Tracking
()
People
(Reporter: gsvelto, Assigned: gsvelto)
References
Details
As per title.
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 1•4 years ago
|
||
Alright, these were the important bits I was missing:
- You have to create a separate DLL that contains three callbacks that will be called out-of-process by WER to decide whenever it takes the crash or not. See the remarks here
- You have to register this DLL using
WerRegisterRuntimeExceptionModule. It's worth noting that this function doesn't seem to check if the DLL you provided exists. It justs records it for later use. - You have to add a registry entry under the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\RuntimeExceptionHelperModuleswith the full path of the DLL you registered (or underHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\Windows Error Reporting\of you're a 32-bit app running under 64-bit Windows).
There's an example module available here.
I'm putting all this background info here so that it doesn't get lost.
| Assignee | ||
Comment 2•4 years ago
|
||
Quick update: I managed to clobber together a Gecko build that wires up all the necessary bits and throws exceptions using __fastfail(). Tomorrow I'll test it to see if we can capture those this way.
| Assignee | ||
Comment 3•4 years ago
|
||
I forgot to update the status here. I did manage to capture a __fastfail() crash using what I described above. It's interesting because apparently ~4 years ago this wasn't possible. My guess is that Microsoft changed the way WER plugins work in the meantime. One thing to keep in mind is that I had to do things a little differently than what was shown in the examples I found. Most of the existing code use the OutOfProcessExceptionEventCallback() to claim the crash (so that WER won't take it) and then use OutOfProcessExceptionEventSignatureCallback() to write the minidump. For regular crashes this work, but not for __fastfail() ones. For __fastfail() crashes only OutOfProcessExceptionEventCallback() gets called in the WER plugin, but it has all the data one needs to write out a minidump so that's OK.
I'm also changing the title to reflect the fact that at the beginning of this investigation I was looking at the right API, but at the wrong function :-)
Description
•