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.
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!
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
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.
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
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 ?
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”…
Pingback: Jochen Kalmbach’s Blog » Blog Archive » Source-Indexing (TFS) und Smbols-Store
Pingback: Jochen Kalmbach’s Blog » Blog Archive » Better sos.dll for debugging in WinDbg available!
Pingback: Comment devenir Sherlock Holmes et diagnostiquer des exceptions comme un pro en .Net | Information générée par une source non certifiée