Re: visit_decref: Assertion `gc-gc.gc_refs != 0' failed.

2005-09-09 Thread Michael Hudson
alexLIGO [EMAIL PROTECTED] writes:

 Hi,

 I got this error when trying to execute the following python command
 with in a C module:  Py_BuildValue

You get that error immediately on calling that function?

 Do anyone have any idea what this error is about?

You've probably got your refcounting wrong somewhere.

Cheers,
mwh

-- 
  You can lead an idiot to knowledge but you cannot make him
  think.  You can, however, rectally insert the information,
  printed on stone tablets, using a sharpened poker.-- Nicolai
   -- http://home.xnet.com/~raven/Sysadmin/ASR.Quotes.html
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: visit_decref: Assertion `gc-gc.gc_refs != 0' failed.

2005-09-09 Thread Tim Peters
[alexLIGO]
 I got this error when trying to execute the following python command
 with in a C module:  Py_BuildValue

 Do anyone have any idea what this error is about?

Just the comment on the failing assert:

assert(gc-gc.gc_refs != 0); /* else refcount was too small */

There are more pointers to the object than the object's reference
count says there are.  That's fatally bad.  Probably due to a missing
Py_INCREF, possibly due to an extra Py_DECREF.

 And does anyone have any idea how to debug a python script?

You need to debug C code here, not Python code.  It's unlikely that
the problem is in C code that ships with Python; it's far more likely
to be in your C code, or in C code from a third-party extension
module.
-- 
http://mail.python.org/mailman/listinfo/python-list