[PyQt] KConfigSkeleton and pyqt4 API version 2

Wolfgang Rohdewald wolfgang at rohdewald.de
Fri Sep 17 09:58:17 BST 2010


On Freitag 17 September 2010, Hans-Peter Jansen wrote:
> first of all, this is the wrong list for PyKDE issues. Try to
> resend this  to the kde-bindings ML:

will do, thank you for pointing me there.

> You're missing to  create a {Q,K}Application instance here.

not needed for this minimal example, I would have thought.
It certainly shows the same problem as the full application.

But I should have tried with gdb - my code actually gives a
nice backtrace at exit time

Program received signal SIGSEGV, Segmentation fault.
~QString (node=0xcf6cff) at /usr/include/qt4/QtCore/qstring.h:882
882     inline QString::~QString() { if (!d->ref.deref()) free(d); }
(gdb) bt
#0  ~QString (node=0xcf6cff) at /usr/include/qt4/QtCore/qstring.h:882
#1  ~QHashNode (node=0xcf6cff) at /usr/include/qt4/QtCore/qhash.h:217
#2  QHash<QString, KConfigSkeletonItem*>::deleteNode2 (node=0xcf6cff)
    at /usr/include/qt4/QtCore/qhash.h:519
#3  0x00007ffff428cc6d in QHashData::free_helper (this=0xcf5160, node_delete=
    0x7ffff47520d0 <QHash<QString, KConfigSkeletonItem*>::deleteNode2(QHashData::Node*)>)
    at tools/qhash.cpp:271
#4  0x00007ffff474ee70 in QHash<QString, KConfigSkeletonItem*>::freeData (this=0xcad330, 
    __in_chrg=<value optimized out>) at /usr/include/qt4/QtCore/qhash.h:568
#5  ~QHash (this=0xcad330, __in_chrg=<value optimized out>)
    at /usr/include/qt4/QtCore/qhash.h:284
#6  ~Private (this=0xcad330, __in_chrg=<value optimized out>)
    at ../../kdecore/config/kcoreconfigskeleton_p.h:40
#7  ~KCoreConfigSkeleton (this=0xcad330, __in_chrg=<value optimized out>)
    at ../../kdecore/config/kcoreconfigskeleton.cpp:1005
#8  0x00007ffff5e6fecc in sipKConfigSkeleton::~sipKConfigSkeleton() ()
   from /usr/lib/pymodules/python2.6/PyKDE4/kdeui.so
#9  0x00007ffff5e02cbc in ?? () from /usr/lib/pymodules/python2.6/PyKDE4/kdeui.so
#10 0x00007ffff67a77f9 in ?? () from /usr/lib/pymodules/python2.6/sip.so
#11 0x000000000046d2d8 in subtype_dealloc (self=<KConfigSkeleton at remote 0x97cf30>)
    at ../Objects/typeobject.c:1019
#12 0x000000000044e577 in insertdict (mp=0x8c8270, key='a', hash=12416037344, value=None)
    at ../Objects/dictobject.c:459
#13 0x0000000000450a77 in PyDict_SetItem (op=
    {'a': None, 'sip': <module at remote 0x7ffff7f03b40>, 'name': 'tilesetName', '__builtins__': <module at remote 0x7ffff7fa2868>, 'KConfigSkeleton': 
<PyQt4.QtCore.pyqtWrapperType at remote 0xc77e20>, 'value': 'I am a value', '__package__': None, 's': <ItemString at remote 0xc3c050>, '__name__': '__main__', 
'__doc__': None}, key='a', value=None)
    at ../Objects/dictobject.c:701
#14 0x000000000045297e in _PyModule_Clear (m=<value optimized out>)
    at ../Objects/moduleobject.c:138
#15 0x00000000004bb5fa in PyImport_Cleanup () at ../Python/import.c:441
#16 0x00000000004c922f in Py_Finalize () at ../Python/pythonrun.c:438
#17 0x000000000041a296 in Py_Main (argc=-135380864, argv=<value optimized out>)
    at ../Modules/main.c:596
#18 0x00007ffff69d9c4d in __libc_start_main (main=<value optimized out>, 
    argc=<value optimized out>, ubp_av=<value optimized out>, init=<value optimized out>, 
    fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fffffffddc8)
    at libc-start.c:226
#19 0x00000000004199f9 in _start ()

-- 
Wolfgang


More information about the PyQt mailing list