assertion error

benevilent at optusnet.com.au benevilent at optusnet.com.au
Thu Jul 22 07:23:35 EDT 2004


Hey,

I'm getting an assertion error as a result of embedding python.

"Modules/gcmodule.c:231: visit_decref: Assertion `gc->gc.gc_refs != 0' 
failed."

I only get this assertion error with Python compiled with debugging 
flags, rathen than the standard library which comes with Debian.

Using gdb I know on what type the object is, which is involved in the 
assertion. It is a subclass of a built-in type which I have defined. 
This subclass has variables which can cause instances of the subclass to 
participate in circular references (the built-in type I have defined 
itself has no member variables). Removing the circular references seems 
to avoid the error.

I was under the impression that python can detect circular references, 
and that this should not be a problem.

Any suggestions as to what else the problem might be?

Thanks,
Laurie



More information about the Python-list mailing list