I have a program that uses external libraries. One of the libraries (responsible for a camera hardware) starts a thread and crashes unpredictably. Sometimes every 2 minutes, sometimes not for an hour. There's no obvious trigger. The exception is not caught be the thread, which leads to a termination of the application. :(
Luckily I can stop the application in the moment the exception is raised by the RaiseException()
function from the kernel32.dll
. There are no other functions on the call stack of which I know what they are for.
The debugger told me, that it's a std::bad_alloc exception. How does the debugger know that? Can I get more information about the exception somehow? If necessary, I would look into the Disassembly, but I don't know where to look to get the information.
I'm using Visual Studio C++ 2010, am well acquainted with assembler and have some understanding of the WINAPI. We want to release this software soon and this bug MUST dissappear.
Use Windbg instead, that is a hard-core debugger that hides nothing and exposes things 'as they are'. Using sxe
syntax enable the desired exception (Windgb will enable to break at any SEH type, not only C++). Windbg also has a clear distinction between first chance exception and second chance exception. You should figure out then whether this is a C++ exception being raise or a more fundamental SEH type like perhaps an AV.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With