I compiled a python module, which is written in C++ and depends on: VTK, ITK, VMTK, CGAL (Also CGAL depends on boost), and libtirpc or XDR to write files in XDR format in Windows 10. I used MinGW-W64 POSIX to build VTK, ITK, VMTK, CGAL, boost, and libtirpc from source. Also, my python comes from Anaconda2 (python 2.7) X64 official pre-built binary. By the way, I should say this python module works fine on UNIX machines for many years but it's for the first time that I'm trying to port it into Windows machines. Everything are compiled fine (with a lot of headaches of course!) but it shows this error at the runtime:
Exception thrown at 0x00007FFA69075553 (ntdll.dll) in python.exe: 0xC0000005: Access violation writing location 0x0000000000000024.
I used Visual Studio stacktrace to find out which part of my module cause this exception and it seems it has some problems with: ntdll.dll!RtlpWaitOnCriticalSection()
More importantly the full stacktrace looks like this:
> ntdll.dll!RtlpWaitOnCriticalSection() Unknown
ntdll.dll!RtlpEnterCriticalSectionContended() Unknown
ntdll.dll!RtlEnterCriticalSection() Unknown
msvcrt.dll!fwrite() Unknown
mgwxdr-0.dll!000000000b324bd3() Unknown
mgwxdr-0.dll!000000000b321635() Unknown
_Generation.pyd!000000006ebcb035() Unknown
_Generation.pyd!000000006ebc316d() Unknown
_Generation.pyd!000000006ebc2bc5() Unknown
_Generation.pyd!000000006ebd48a2() Unknown
python27.dll!PyCFunction_Call(_object * func, _object * arg, _object * kw) Line 81 C
python27.dll!call_function(_object * * * pp_stack, int oparg) Line 4372 C
python27.dll!PyEval_EvalFrameEx(_frame * f, int throwflag) Line 3013 C
python27.dll!fast_function(_object * func, _object * * * pp_stack, int n, int na, int nk) Line 4458 C
python27.dll!call_function(_object * * * pp_stack, int oparg) Line 4392 C
python27.dll!PyEval_EvalFrameEx(_frame * f, int throwflag) Line 3013 C
python27.dll!fast_function(_object * func, _object * * * pp_stack, int n, int na, int nk) Line 4458 C
python27.dll!call_function(_object * * * pp_stack, int oparg) Line 4392 C
python27.dll!PyEval_EvalFrameEx(_frame * f, int throwflag) Line 3013 C
python27.dll!fast_function(_object * func, _object * * * pp_stack, int n, int na, int nk) Line 4458 C
python27.dll!call_function(_object * * * pp_stack, int oparg) Line 4392 C
python27.dll!PyEval_EvalFrameEx(_frame * f, int throwflag) Line 3013 C
python27.dll!PyEval_EvalCodeEx(PyCodeObject * co, _object * globals, _object * locals, _object * * args, int argcount, _object * * kws, int kwcount, _object * * defs, int defcount, _object * closure) Line 3604 C
python27.dll!run_mod(_mod * mod, const char * filename, _object * globals, _object * locals, PyCompilerFlags * flags, _arena * arena) Line 1386 C
python27.dll!PyRun_FileExFlags(_iobuf * fp, const char * filename, int start, _object * globals, _object * locals, int closeit, PyCompilerFlags * flags) Line 1372 C
python27.dll!PyRun_SimpleFileExFlags(_iobuf * fp, const char * filename, int closeit, PyCompilerFlags * flags) Line 958 C
python27.dll!PyRun_AnyFileExFlags(_iobuf * fp, const char * filename, int closeit, PyCompilerFlags * flags) Line 762 C
python27.dll!Py_Main(int argc, char * * argv) Line 649 C
python.exe!__tmainCRTStartup() Line 586 C
_Generation.pyd
is my python module and it just crashes when it tries to write a XDR (cf. mgwxdr-0.dll
) file into the disk, which is also shown in the stacktrace at msvcrt.dll!fwrite()
. Honestly, I have no clue why it happens and how to resolve it. Any idea or suggestion is appreciated.
User contributions licensed under CC BY-SA 3.0