I used Python as embeded in C++ program, which is made up of a EXE and a DLL. Py_Initialize() and Py_Finalize() are put in DllMain().

But everytime after the program starts, an "Access Violation" will be thrown. I looked up the Assembly code, the crash appears after Py_Finalize() returns:

 }else if(dwReason == DLL_PROCESS_DETACH){
1000B4B9  test        eax,eax
1000B4BB  jne         DllMain+23h (1000B4C3h)
  Py_Finalize();
1000B4BD  call        dword ptr [__imp__Py_Finalize (1000E1A0h)]
 }
 return true;
1000B4C3  mov         al,1        <-------------------------- 0xC0000005 thrown by here
}
1000B4C5  ret         0Ch 

 

What may be the probable reason that caused this error? Thank you:)

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to