[PySide] random crashes in pyside during signals

Luc-Eric Rousseau lucericml at gmail.com
Tue Apr 23 22:47:55 CEST 2013


Hello, I'm getting frequent crashes in pyside, in different
circumstances but always in the same call stack, although it might be
for different controls.

I'm wondering if anyone else is getting these, if there are fixes for
this, or if you'd have suggestion of cases when this might occur.


The crash occurs because in  SignalManager::retriveMetaObject the
metaObject pointer is NULL.    I've put a sample callstack at the end
of this mail.


I'm using pyside 1.1.2  with qt4.8 and the crash reproducible on OSX
or Windows, 64-bit.
We built pyside ourselves on windows, but we are using the binary
distribution on the Mac from the website.

The app is a big dialog box that is completely written in Python, and
all the controls are created dynamically.   It's not rocket science or
hack-y code, there is no weird hooking of events or anything advanced.
You might get the crash right away, or need to do a lot of operations
in the dialog box before the crash occurs: Sometime it will crash when
clicking a button or when the code calls clear() on a QListWidget

I've tried to reproduce the crash in a simpler test app, but up to now
I haven't been able to.  In the actual app, changing code around does
make the crash stop, but then it can show up in another place.  I've
stubbed out all the logic from the dialog to rule out anything that
might not be python/pyside related.



       pyside-python2.7.dll!PySide::SignalManager::retriveMetaObject(_object
* self=0x0000000010a04c98)  Line 546 + 0xe bytes C++

      QtGui_d.pyd!QWidgetWrapper::metaObject()  Line 1353    C++

>      QtGui_d.pyd!Sbk_QWidget_Init(_object * self=0x0000000010c11bb8, _object * args=0x0000000011e8d058, _object * kwds=0x0000000000000000)  Line 1480 + 0xf bytes     C++

      python27_d.dll!type_call(_typeobject * type=0x000007fed2475280,
_object * args=0x0000000011e8d058, _object * kwds=0x0000000000000000)
Line 737 + 0x45 bytes     C

      python27_d.dll!PyObject_Call(_object * func=0x000007fed2475280,
_object * arg=0x0000000011e8d058, _object * kw=0x0000000000000000)
Line 2529 + 0x13 bytes      C

      python27_d.dll!do_call(_object * func=0x0000000000000000,
_object * * * pp_stack=0x0000000001117670, int na=-767077760, int
nk=17921560)  Line 4239 + 0xe bytes    C

      python27_d.dll!call_function(_object * * *
pp_stack=0x0000000001117670, int oparg=760758252)  Line 4046   C

      python27_d.dll!PyEval_EvalFrameEx(_frame * f=0x0000000026b88f48,
int throwflag=197437088)  Line 2668       C

      python27_d.dll!PyEval_EvalCodeEx(PyCodeObject *
co=0x0000000000000003, _object * globals=0x0000000000000004, _object *
locals=0x0000000034b73be8, _object * * args=0x0000000000000000, int
argcount=4, _object * * kws=0x0000000000000000, int kwcount=0, _object
* * defs=0x00000000327d3780, int defcount=4, _object *
closure=0x0000000000000000)  Line 3253 + 0xf bytes   C

      python27_d.dll!function_call(_object * func=0x00000000327d8698,
_object * arg=0x0000000034e6e058, _object * kw=0x0000000000000000)
Line 531 + 0x73 bytes       C

      python27_d.dll!PyObject_Call(_object * func=0x00000000327d8698,
_object * arg=0x0000000034e6e058, _object * kw=0x0000000000000000)
Line 2529 + 0x13 bytes      C

      python27_d.dll!instancemethod_call(_object *
func=0x00000000327d8698, _object * arg=0x0000000034e6e058, _object *
kw=0x0000000000000000)  Line 2578 + 0x1d bytes  C

      python27_d.dll!PyObject_Call(_object * func=0x0000000010715a30,
_object * arg=0x0000000032b5d6e8, _object * kw=0x0000000000000000)
Line 2529 + 0x13 bytes      C

      python27_d.dll!slot_tp_init(_object * self=0x0000000010c11988,
_object * args=0x0000000032b5d6e8, _object * kwds=0x0000000000000000)
Line 5663 + 0x14 bytes    C

      python27_d.dll!type_call(_typeobject * type=0x000000003131e538,
_object * args=0x0000000032b5d6e8, _object * kwds=0x0000000000000000)
Line 737 + 0x45 bytes     C

      python27_d.dll!PyObject_Call(_object * func=0x000000003131e538,
_object * arg=0x0000000032b5d6e8, _object * kw=0x0000000000000000)
Line 2529 + 0x13 bytes      C

      python27_d.dll!do_call(_object * func=0x0000000000000003,
_object * * * pp_stack=0x0000000001117e30, int na=825353528, int
nk=17923544)  Line 4239 + 0xe bytes     C

      python27_d.dll!call_function(_object * * *
pp_stack=0x0000000001117e30, int oparg=337306920)  Line 4046   C



More information about the PySide mailing list