Python.exe Application Error using Extensions on Win2000

Mark Hammond mhammond at skippinet.com.au
Wed Mar 8 17:19:22 EST 2000


"Desaulniers, Peter" <Peter.Desaulniers at pahv.xerox.com> wrote in
message
news:51B8ABCE456FD111899900805F6FD6EE071E90C2 at mercury.ADOC.xerox.com..
.

My guess is that your code has a bug (possibly a Python ref counting
bug).  NT is not showing it, but Win2k is.  (Another alternative is
that you are not using the CRTL in a DLL - ie, the /MD switch, on the
compiler)

This implies to me that the problem is in the CRTL heap some where.
It is not uncommon for small bugs in the heap to go unnoticed.

I would suggest attempting to move to a debug build.  This will bring
in the debug CRTL, and this is pretty good at checking logic errors in
your heap usage - all mallocs blocks have guard regions, all pointers
are checked for previous use etc.  The other handy thing with the
debug builds is that you get to use the debugger :-)  When you get the
crash, the debugger can show you where it was, which often gives you a
good indication - eg, if the crash came from the CRTL during a free
call, you are 1/2 way home :-)

good luck!

Mark.
> Hello Fellow Pythoners,
>
> I hope this is the appropriate list for this type of request.
>
> The architecture is a python method that make a call into a C
extension
> which in turn loads a 3rd party DLL (via LoadLibrary and later
> FreeLibrary).  A Py_Object is created in the extension which
includes a
> member object obtained from a call into the DLL. The Py_Object is
returned
> to the python method.  The python method then makes calls to the
methods on
> the 3rd party object via the Py_Object.  The code works fine.
Everything
> happens as is should then the error occurs at the very end when its
cleaning
> up.
...






More information about the Python-list mailing list