[C++-sig] Issues with Debug/Release versions of Python and extensions
Alexander Eisenhuth
newsuser at stacom-software.de
Fri Feb 2 20:09:48 CET 2007
Hello everybody,
did some of you got ever into a hell of runtime problems like
_CrtIsValidHeapPointer on Windows ? (Debug Version of a multithreaded Python
extension)
No?
Ok a straight question, that hopefully anybody can answer.
Might there appear problems, when I use a standard python Installation
(nodebug-version) on windows to debug a extension (debug-version) ?
Now a bit more deeper in detail what happens:
I import a debug c++ extension build with vc6.0 with bosst.python. After some
calls from python -> Extension, various threads are initialized and do a lot of
work (but no python API calls). In total I've 4 threads. The python (main)
thread waits on a raw_input(), so I'm quite sure nothing happens in the main thread.
After some time (not predictable) the _CrtIsValidHeapPointer() assertion fails
(This is only done by CRT in debug mode) in a extension thread.
When I compile the extension as release, no _CrtIsValidHeapPointer() appears of
course, but no other noticable problems appear also.
I'm quite sure that the extensions code is clean, because this is used for many
years without python as C++ application.
Every comment is very welcome.
Thank a lot for reading
Alexander
More information about the Cplusplus-sig
mailing list