BCB5 & Py_InitModule in python 2.3.5 crashes sometimes

anton antonxx at gmx.de
Thu Jun 2 03:00:26 EDT 2005


Hi,

I embedded the python 2.3.5 interpreter in my Borland C++ Builder 5
application on WinXP pro Sp2 and all runs fine.

(I translated the python23.lib with coff2omf)

But from time to time when I call Py_InitModule
I get a dialog:

Title: Microsoft Visual C++ Runtime Library
Text:
   Program: bla\bla\myapp.exe

   This application has requested the Runtime to terminate in an
   unusual way, please contact the applicatio'n team for
   more information.

(This problem appears sometime somewhere else too, but
I was not able to localize it)

My question is:

- has somebody experienced something similar with BCB5?
  (so I know if its perhaps a bug in bcb only)

- or is it a bug in python 2.3.5

- has the python interpreter some threads which are
  perhaps not completely initialized??

- would python 2.4.1 help (since its linked with VS 2003??)


When I go through my code step by step in the bcb debugger
all runs fine, only if i "run" over the critical part
I get the problem. (thats the reason its so hard to localize)

The python interpreter is initialized when
I click on a button in my app (not in the startapp of the app)

The funny thing: I crash 3 times my app, and when I try it the 4'th
time it works.

I would be very glad for even a small hint, since
actually I have no more ideas :-(

Thanks




More information about the Python-list mailing list