c++ - Access violation in MiniDumpWriteDump when invoked out-of-process -


the documentation of minidumpwritedump function states

minidumpwritedump should called separate process if @ possible, rather within target process being dumped.

so wrote small mfc crash handler program that. followed advice in this answer hans passant, i.e. passing value of exception pointer crashing program crash handler program though exception pointer not valid in context of crash handler program. works when run tests in debug build, when switch release build crash handler program crashes, access violation occurs inside minidumpwritedump function.

i stumped. why should work in debug builds, not in release builds? it's maddening because access violations indicators accessing invalid pointers, , exception pointer receiving in crash handler program indeed invalid - on other hand told should not matter, minidumpwritedump interpreting pointer in context of crashing process (from pointer originated).

any ideas doing wrong?

on sidenote: in answer, hans proposes solution watchdog process pre-launched, goes sleep , wakes when triggeredd crashing process. solution different: launching crash handler program @ time when crash occurs, pass necessary information crashing program crash handler program via command line arguments. double-checked information being passed correct, exception pointer.

i struggled similar issue, , have noticed wrong.

the msdn documentation of minidump_exception_information states clientpointers field must true if exceptionpointers address target process instead of local process.

after setting field correctly, can pass threadid , exceptionpointers crashing process, fill them minidump_exception_information in dump-writing process, , works perfectly.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -