I'm working on an multi-threaded application, which has generally worked fine.
Now it seems that the subthreads are crashing, and by configuring Visual Studio in order to throw C++ exceptions, I've discovered following information about the exception:
ExceptionCode : 3765269347
ExceptionFlags : 1
ExceptionRecord : <NULL>
ExceptionAddress : 0x0000...0
NumberOfParameters : 4
params:
magicNumber : 429065504
pExceptionObject : 0x... (some memory address)
pThrowInfo : 0x... (some memory address) {<application.exe>_Tl3?AVC_IOException@@ ...
attributes : 0
pmfnUnwind : 470560
pForwardCompat : 0
pCatchableTypeArray : 6451800
pThrowImageBase : 0x... (some memory address) {<application.exe>_IMAGE_DOS_HEADER_ImageBase}
loadlibrary()
virtual void fillBuffersBeforeWrite(const <internal_struct>* pDsp, size_t nByteCount)
{
<internal_class>* w = writer();
if (w && (w != this)) {
w->fillBuffersBeforeWrite(pDsp, nByteCount);
}
}
Try to catch the code that throws the exception: in MS Visual Studio 2015, Debug -> Windows -> Exception Settings, select "C++ Exceptions", right click "Add Exception", insert the exception type - "AVC_IoException"; mark also other common exception types - std::exception, CException etc. The debugger will stop in line where the exception is thrown. You can than analyze the stack. Be aware that you possibly may need to skip (i.e. to ask the debugger to continue) the irrelevant exceptions. It is also a good idea to keep the debug builds of all 3d parties, including the C++/C run-time and the OS.