[PyQt] segfaults in sip getattr

Erik Janssens tw55413 at gmail.com
Tue Sep 15 17:18:00 BST 2009


Hi,

I'm having segfaults in the sip getattr function.

Apparently the code somewhere tries to resolve the '__dtor__' attribute.

This appears to happen when a bunch of widgets get destructed.

Nowhere in the code have custome __del__ or __dtor__ methods been
implemented.

Any idea on what is causing this or how it could be solved is
more than welcome.

I'm running on ubuntu 9.04 using the pyqt and qt libraries
from the system.

Thx,

Erik
-------------- next part --------------
(gdb) bt
#0  0x0808c286 in PyObject_GenericGetAttr (obj=0x972ceec, name=0x97351e0) at ../Objects/object.c:1294
#1  0xb7f75c1e in sipWrapper_getattro (obj=0x972ceec, name=0x97351e0) at /build/buildd/sip4-qt3-4.7.9/siplib/siplib.c:7722
#2  0x0808c949 in PyObject_GetAttrString (v=0x972ceec, name=0xb7f7ea13 "__dtor__") at ../Objects/object.c:1074
#3  0xb7f761e7 in sip_api_is_py_method (gil=0xb55eb1fc, pymc=0xb55eb1ec, sipSelf=0x972ceec, cname=0x0, mname=0xb7f7ea13 "__dtor__") at /build/buildd/sip4-qt3-4.7.9/siplib/siplib.c:5344
#4  0xb7f76a12 in sip_api_common_dtor (sipSelf=0x972ceec) at /build/buildd/sip4-qt3-4.7.9/siplib/siplib.c:3679
#5  0xb788d191 in ~sipQGroupBox (this=0xb4be36b0) at sipQtGuipart6.cpp:9086
#6  0xb6a4fe3f in QObjectPrivate::deleteChildren (this=0xb4bcacc8) at kernel/qobject.cpp:1854
#7  0xb6cca66b in ~QWidget (this=0xb4bca9b8) at kernel/qwidget.cpp:1373
#8  0xb798145b in ~sipQWidget (this=0xb4bca9b8) at sipQtGuipart9.cpp:64250
#9  0xb6a4fe3f in QObjectPrivate::deleteChildren (this=0xb4b30320) at kernel/qobject.cpp:1854
#10 0xb6ccaddb in ~QWidget (this=0xb4b30910) at kernel/qwidget.cpp:1373
#11 0xb6a4fe3f in QObjectPrivate::deleteChildren (this=0xb4b2c800) at kernel/qobject.cpp:1854
#12 0xb6cca66b in ~QWidget (this=0xb4b44470) at kernel/qwidget.cpp:1373
#13 0xb70a9cd1 in ~QFrame (this=0xb4b44470) at widgets/qframe.cpp:243
#14 0xb7149abd in ~QAbstractScrollArea (this=0xb4b44470) at widgets/qabstractscrollarea.cpp:497
#15 0xb714f721 in ~QScrollArea (this=0xb4b44470) at widgets/qscrollarea.cpp:176
#16 0xb77bb859 in ~sipQScrollArea (this=0xb4b44470) at sipQtGuipart4.cpp:542
#17 0xb6a4fe3f in QObjectPrivate::deleteChildren (this=0xb4b79240) at kernel/qobject.cpp:1854
#18 0xb6cca66b in ~QWidget (this=0xb4bd1530) at kernel/qwidget.cpp:1373
#19 0xb70a9cd1 in ~QFrame (this=0xb4bd1530) at widgets/qframe.cpp:243
#20 0xb7113bab in ~QSplitter (this=0xb4bd1530) at widgets/qsplitter.cpp:1008
#21 0xb774cf4f in ~sipQSplitter (this=0xb4bd1530) at sipQtGuipart3.cpp:29566
#22 0xb6a4fe3f in QObjectPrivate::deleteChildren (this=0xb4b96e78) at kernel/qobject.cpp:1854
#23 0xb6cca66b in ~QWidget (this=0xb4ba8198) at kernel/qwidget.cpp:1373
#24 0xb798145b in ~sipQWidget (this=0xb4ba8198) at sipQtGuipart9.cpp:64250
#25 0xb7930f72 in release_QWidget (sipCppV=0xb4ba8198, state=262) at sipQtGuipart9.cpp:72761
#26 0xb7930fb4 in dealloc_QWidget (sipSelf=0x97351e0) at sipQtGuipart9.cpp:72775
#27 0xb7f77633 in sipWrapper_dealloc (self=0x982496c) at /build/buildd/sip4-qt3-4.7.9/siplib/siplib.c:7543
#28 0x0809ff45 in subtype_dealloc (self=0x982496c) at ../Objects/typeobject.c:709
#29 0x08088e94 in dict_dealloc (mp=0x9829f0c) at ../Objects/dictobject.c:855
#30 0xb7f729b3 in sipWrapper_clear (self=0x97285ec) at /build/buildd/sip4-qt3-4.7.9/siplib/siplib.c:7430
#31 0x080f898e in collect (generation=0) at ../Modules/gcmodule.c:713
#32 0x080f92c6 in _PyObject_GC_New (tp=0x8162000) at ../Modules/gcmodule.c:897
#33 0x08114686 in wrapperdescr_call (descr=0xb7d41d74, args=0x9720f6c, kwds=0x0) at ../Objects/descrobject.c:1058
#34 0x0805d897 in PyObject_Call (func=0x97351e0, arg=0x9720f6c, kw=0x0) at ../Objects/abstract.c:1861
#35 0x080ccd4d in PyEval_EvalFrameEx (f=0x91d28d4, throwflag=0) at ../Python/ceval.c:3823
#36 0x080cfea5 in PyEval_EvalCodeEx (co=0x8b22da0, globals=0xb7c61b54, locals=0x0, args=0x970cbf8, argcount=1, kws=0x0, kwcount=0, defs=0x8b498d8, defcount=1, closure=0x0) at ../Python/ceval.c:2875
#37 0x08117511 in function_call (func=0x8b9d844, arg=0x970cbec, kw=0x0) at ../Objects/funcobject.c:517
#38 0x0805d897 in PyObject_Call (func=0x97351e0, arg=0x970cbec, kw=0x0) at ../Objects/abstract.c:1861
#39 0x08063aaa in instancemethod_call (func=0x8b9d844, arg=0x970cbec, kw=0x0) at ../Objects/classobject.c:2519
#40 0x0805d897 in PyObject_Call (func=0x97351e0, arg=0xb7d8102c, kw=0x0) at ../Objects/abstract.c:1861
#41 0x080a6568 in slot_tp_init (self=0x96803ec, args=0xb7d8102c, kwds=0x0) at ../Objects/typeobject.c:4976
#42 0x080adac1 in type_call (type=0x8b5b9fc, args=0xb7d8102c, kwds=0x0) at ../Objects/typeobject.c:436
#43 0x0805d897 in PyObject_Call (func=0x97351e0, arg=0xb7d8102c, kw=0x0) at ../Objects/abstract.c:1861
#44 0x080ccd4d in PyEval_EvalFrameEx (f=0x9463e54, throwflag=0) at ../Python/ceval.c:3823
#45 0x080cfea5 in PyEval_EvalCodeEx (co=0x8bc14a0, globals=0x8ba0934, locals=0x0, args=0x9463e08, argcount=2, kws=0x9463e10, kwcount=0, defs=0x8bdd798, defcount=1, closure=0x0) at ../Python/ceval.c:2875
#46 0x080ce7d4 in PyEval_EvalFrameEx (f=0x9463c6c, throwflag=0) at ../Python/ceval.c:3708
#47 0x080cfea5 in PyEval_EvalCodeEx (co=0x905a068, globals=0x9047a44, locals=0x0, args=0x9735258, argcount=2, kws=0xb34026f8, kwcount=0, defs=0x9091cb8, defcount=3, closure=0x0) at ../Python/ceval.c:2875
#48 0x081175fe in function_call (func=0x90992cc, arg=0x973524c, kw=0x980dcec) at ../Objects/funcobject.c:517
#49 0x0805d897 in PyObject_Call (func=0x97351e0, arg=0x973524c, kw=0x980dcec) at ../Objects/abstract.c:1861
#50 0x080cd392 in PyEval_EvalFrameEx (f=0xb4ba927c, throwflag=0) at ../Python/ceval.c:3892



More information about the PyQt mailing list