Martin T.
2009-01-13 16:53:01 UTC
( X post ms...vc.debugger + ms...vc.language )
Greetings.
C++ Windows application / release build with all optimizations disabled
/ Visual Studio 2005 / Windows XP sp2
I am facing the problem that our application terminates unexpectedly
without any debug/reporting mechanism being invoked, i.e. it terminates
*as if* I would issue the call ::TerminateProcess(hCurrent, 0xC0000005)
manually. However, we are sure that no user code in our application
calls TerminateProcess (let alone with the code for access violation).
This happens *only* if the release build (no optimization) of this app
is *not* run under the debugger, i.e. started normally via explorer or
command line.
The application has set an unexpected filter via
SetUnhandledExceptionFilter(..) but this handler is not invoked. (It
*is* correctly invoked if I cause an acc.viol. anywhere in user code,
e.g. by dereferencing a NULL pointer)
The application does not terminate through abort() as that would display
a dialog.
The app does not terminate through ExitProcess()/exit() as that would
run global destructors and these are not run.
The process exits shortly (< 1sec) after a call to FreeLibrary(..) in
one thread, but as determined through tracing, not during this
FreeLibrary call and probably not during this thread.
If the FreeLibrary call is not issued the error does not happen.
I'm strongly suspecting the cleanup code of this 3rd party DLL to break
something but I'm really lost how to narrow it down as I have no
starting point whatsoever where the access violation happens.
Any ideas welcome!
cheers,
Martin
Greetings.
C++ Windows application / release build with all optimizations disabled
/ Visual Studio 2005 / Windows XP sp2
I am facing the problem that our application terminates unexpectedly
without any debug/reporting mechanism being invoked, i.e. it terminates
*as if* I would issue the call ::TerminateProcess(hCurrent, 0xC0000005)
manually. However, we are sure that no user code in our application
calls TerminateProcess (let alone with the code for access violation).
This happens *only* if the release build (no optimization) of this app
is *not* run under the debugger, i.e. started normally via explorer or
command line.
The application has set an unexpected filter via
SetUnhandledExceptionFilter(..) but this handler is not invoked. (It
*is* correctly invoked if I cause an acc.viol. anywhere in user code,
e.g. by dereferencing a NULL pointer)
The application does not terminate through abort() as that would display
a dialog.
The app does not terminate through ExitProcess()/exit() as that would
run global destructors and these are not run.
The process exits shortly (< 1sec) after a call to FreeLibrary(..) in
one thread, but as determined through tracing, not during this
FreeLibrary call and probably not during this thread.
If the FreeLibrary call is not issued the error does not happen.
I'm strongly suspecting the cleanup code of this 3rd party DLL to break
something but I'm really lost how to narrow it down as I have no
starting point whatsoever where the access violation happens.
Any ideas welcome!
cheers,
Martin