By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,100 Members | 2,979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,100 IT Pros & Developers. It's quick & easy.

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

P: n/a
Hi,

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?
And does anyone have any idea how to debug a python script?

Thanks
Alexander

Sep 5 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"alexLIGO" <di***@rouge.phys.lsu.edu> 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
Sep 9 '05 #2

P: n/a
[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.
Sep 9 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.