Writing MiniDumps in C#
After creating my previous post (MiniDump support in .NET4), I tried to figure out how to write minidumps (MiniDumpWriteDump) without needing unmanaged code. I could not find any example… so I wrote one (which also works for x86 and x64/IA64).
Here is the example:
MiniDumpWriteDump direct from C# for x86 and x64/IA64.
December 15th, 2008 at 04:54
Hay, Jochen! I retrieve your article and codes about STACKWALKER from codeproject.com. And I encounted some problems when i tried to wrap your code as a dll, i have no idea about the solution, if you see these words, please send me a email, and i’ll post you the sceenshots, thanks!
December 15th, 2008 at 16:27
Hi Jochen,
For native code, many people recommend that the faulting process simply signal another process to generate the dump. But in the case of .NET exceptions, I would think that the data structures of the faulting process would not be corrupt and it would be okay to write the dump in process. What’s your opinion?
thanks,
Marc
December 15th, 2008 at 16:38
This is a hard question… in general it is always safer to write the dump out-of-process, especially for stack-overflows… but as you said: this is at least true for unmanaged code. I generate (in-process) minidumps for managed code since several months without any problems (except that it does not support source-lines…)
So: I can’t answer your question…
MS would say: Please use WER (Windows Error Reporting)! Then you don’t have to care about this, because the dump is written out-of-process.
December 17th, 2008 at 02:51
Hi, Jochen, Would you like to tell me about your email address, i wanna communicate with you about some details about the STACKWALKER, thanks
with regards, hefe
January 9th, 2009 at 15:39
Hi Jochen,
Do you think minidumps are better solution than simply logging the error ?
What information can we have with a minidumps that we can’t have with a logging solution ?
January 9th, 2009 at 15:41
If you have a mixed-mode app, then you can’t log the exeption. Also you never get line-infos (except if you redistribute the PDB, which is not a good idea).
The main advantages is “line-numbers”…
November 9th, 2009 at 15:51
[…] einzige was Du bekommst ist ein Dump-File (z.B. entweder via WER oder durch eigenes schreiben von MiniDumpWriteDump). Jetzt beginnt für Dich das […]