Reputation: 7962
I have an executable which calls a DLL. I can step through DLL code by attaching VS2008 project of DLL to process of executable. I debugged some errors/exceptions already. But now, exactly when main function of DLL returns, executable process crashes without any error/exception. To debug the crash, I tried to use crash-dump file, but based on this link, looks like they don't work with VS2008.
What possible tools can I use to debug the crash?
process calls this when dying:
TerminateProcess(GetCurrentProcess(), STATUS_INVALID_CRUNTIME_PARAMETER);
Upvotes: 1
Views: 2432
Reputation: 179907
TerminateProcess(GetCurrentProcess(), STATUS_INVALID_CRUNTIME_PARAMETER);
is a strong indication that the runtime library terminated your process because you passed a bad parameter to a library function. And "bad" was so bad that it couldn't reasonably continue. You're probably not looking at something as trivial as sqrt(-1.0)
, but perhaps strlen(NULL)
or std::sort(... , &std::equal<int>)
[edit]
To find the root cause, it can help to provide a invalid_parameter_handler)(
. In it, call __debugbreak
to invoke the debugger. The stack trace will now show the cause.
Upvotes: 1