Reference Counting Woes in Python 1.5.2! Help!

Warren Postma embed at NOSPAM.geocities.com
Fri Jun 30 15:22:21 EDT 2000


I am embedding Python and until recently had no problems with Reference
Counting.  Now I have one, and it has crept in during about a 6 day stint of
intensive coding, involving converting my application from a single threaded
python application to correctly using the python global interpreter lock and
creating thread state information for each thread.

Now i have a subtle reference count underflow bug, which seems to be causing
objects to be freed while still referenced.

I am using Visual C++ 6. It has debug libraries that are catching this
problem printing an error message and quitting. When I go to release version
of code, I get access violations and then the code quits. Alas, what I'd
like is to see the access violation location in source code, but the darn
debug library gets in the way!

Has anyone else debugged pesky reference count problems in Visual C++ with
Python 1.5.x and come out on the winning end? Your help or tips or
suggestions on how to debug this sort of thing would be most welcome!

Warren Postma





More information about the Python-list mailing list