[PySide] Regression in pysidesignal.cpp?

Sean Heelan seanheelan at gmail.com
Wed Jan 21 19:58:31 CET 2015

Hi guys,

Today in a PySide project I noticed a crash with a stack trace starting
from line 469 of pysidesignal.cpp. This is within the
signalInstanceDisconnect function and is on a call to Py_DECREF on a value
that is returned by PyObject_CallObject. PyObject_CallObject can return
NULL if it fails and so what should be used on its result is Py_XDECREF.

I quickly googled "signalInstanceDisconnect" and came across this [1] which
is a bug report from 2012 reporting the same error, but also claiming to
have been fixed along with a commit to git. Looking at the code on HEAD on
the master branch at [2] you can see that Py_DECREF is still used though.

Git blame has no indication that this was ever fixed [3], and I can't find
the git commit with the ID mentioned either. I was under the impression
that PySide has moved repository at least once in the past, so perhaps the
commit was lost then? Or am I looking at an out of date copy of the code?

Any explanation of the discrepancy would be appreciated.


[1] http://srinikom.github.io/pyside-bz-archive/1158.html


[3] git blame -L469 libpyside/pysidesignal.cpp | head -n 1
d0decf40 libpyside/pysidesignal.cpp (Renato Filho      2011-08-26 19:11:54
-0300 469)             Py_DECREF(result);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20150121/c78901eb/attachment.html>

More information about the PySide mailing list