we use in our programs a custom exception filter where a minidump is
produced in case of a serious error. This is quite handy during in
house testing where crashes can be analysed.
However we noticed that with vstudio 2008 dumps weren't produced.
Investigating the matter (and googling), it seems that the crt
disables this facility:
_SCL_SECURE_OUT_OF_RANGE -> _invalid_parameter -> _invoke_watson where
a 'SetUnhandledExceptionFilter(NULL)' is made, disabling any client
defined exception filter.
This is quite unhandy. There seems no way to enable it, except
compiling the crt yourself and adjusting the source code. You can add
an invalid parameter handler, but its arguments have only use in
writing some useless log statements. The dump is the essential part,
since there one can do a stack trace.
Do i miss something here and perhaps is there a way to dump? Or should
I simulate a local dump in the 'invalid parameter handler'. It is
horse trick, probably working but a lot of effort for something basic.
Wkr,
me
> _SCL_SECURE_OUT_OF_RANGE -> _invalid_parameter -> _invoke_watson where
> a 'SetUnhandledExceptionFilter(NULL)' is made, disabling any client
> defined exception filter.
This "feature"is by design ;(
For more info see:
http://blog.kalmbach-software.de/2008/04/02/unhandled-exceptions-in-vc8-and-above-for-x86-and-x64/
http://blog.kalmbachnet.de/?postid=75
http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=4c9e4bf1-43e7-4ad5-9610-c09ff294bf18
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101337
--
Greetings
Jochen
My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Thx.
Your trick is to intercept a possible 'SetUnhandledExceptionFilter
(NULL)'. I will think about that (note that I believe that ms also
released a sdk in which one could hook api calls)
You're right, Microsoft Detours (http://research.microsoft.com/en-us/projects/detours/)
--
Cholo Lennon
Bs.As.
ARG