When things go badly in PyGC_Collect()

Aahz aahz at pythoncraft.com
Fri Feb 27 21:49:22 CET 2004

In article <mailman.202.1077899652.8594.python-list at python.org>,
Paul Miller  <paul at fxtech.com> wrote:
>I'm running into a situation where the first call to PyCG_Collect during a 
>Py_Finalize, is dying a horrible death and throwing an exception. It is 
>after *MANY* iterations of the GC loop, so I haven't pinpointed where 
>exactly it is happening.
>Some notes - this is with Python 2.3 BTW, on Windows.
>1. this happens in some code where I'm initializing Python, doing some 
>script/module stuff, finalizing Python, and then doing the process again
>2. it happens on the SECOND time, during the Py_Finalize
>3. it only seems to happen if I've used the zip importer
>4. it DOES NOT happen in a trivial test program I wrote that doesn't have 
>all the massive script baggage in my real program

What's the exception and stack trace?  Are you using weakrefs at all?
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Do not taunt happy fun for loops. Do not change lists you are looping over."
--Remco Gerlich, comp.lang.python

More information about the Python-list mailing list