Details
-
Bug
-
Resolution: Done
-
P2: Important
-
1.1.0, 1.2.x
-
a4690116881477d09f34f6b20b2ee0f31c06163d
Description
(Note this was: http://bugs.pyside.org/show_bug.cgi?id=1152)
See the attached example for a demonstration of the problem.
I'll also attach the traceback I got from gdb.
Essentially what appears to happen is this:
1. PySide::MetaFunction::call converts the arguments to the signal to cpp
values
2. The shiboken converter to do that converts Py_None to a NULL-pointer
(pythonToCppPointer in libshiboken/sbkconvert.cpp)
3. The QMetaObject system tries to make a copy of the PyObject pointer using a
PySide::PyObjectWrapper which then goes boom when trying to INCREF its
underlying python object
I have attached a simple patch that uses Py_XINCREF/DECREF instead. With
this I no longer get a crash, but I don't know the pyside internals well
enough to know if this is a good solution or just masking the symptoms of the
real problem.
Versions used:
apiextractor 0.10.10
generatorrunner 0.6.16
shiboken 1.1.0
pyside 1.1.0
Additional notes:
I verified that the bug is still present in the current gittorious/gerrit repositories
The original bug also contained this comment:
> Hugo Parente Lima 2012-02-27 19:06:49 CET
> Maybe would be nice to avoid create the PyObjectWrapper instance with a null pointer instead of using X_INC/DECREF's
Attachments
For Gerrit Dashboard: PYSIDE-17 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
224707,2 | Use XINCREF/XDECREF in PyObjectWrapper constructor | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |