Dominique Dominique - 23 days ago 5
C++ Question

How to handle C++ Exception 3765269347

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}


(I've tried to copy as good as possible, don't shoot me in case of typos)

I've been looking on the internet for the mentioned exception code but I don't understand the explanation and I've searched for the mentioned "AVC_IoException" but I didn't find anything. Does anybody know what I can do here?

For your information, the exception is thrown when I try to write something into a buffer (for your information, this buffer is not NULL), it seems not to be related to the loading of any DLL files (I've put breakpoints at every
loadlibrary()
function, but none of them was called).

Hereby the piece of code (it's a recursive function, writing something into a buffer):

virtual void fillBuffersBeforeWrite(const <internal_struct>* pDsp, size_t nByteCount)
{
<internal_class>* w = writer();
if (w && (w != this)) {
w->fillBuffersBeforeWrite(pDsp, nByteCount);
}
}


Thanks in advance

Answer

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.