[PyQt] Crash when using KFileItemList (regression) - with testcase
Krzysztof Lichota
krzysiek at lichota.net
Wed Oct 15 19:19:19 BST 2008
Hi.
I have run into regression when using KFileItemList which is emitted in signal.
It worked OK in Kubuntu Dapper (pyQt 3.15.1, pyKDE
3.15.1+snapshot20060118, SIP 4.3.2), while in Kubuntu Hardy (pyQt
3.17.4, pyKDE 3.16.0, SIP 4.7.3) it causes application crash due to
segfault.
It seems crash happens during conversion from Qt structure to Python,
but I don't know where exactly the problem is: in pyKDE, pyQT or SIP.
The last code executed is this:
#1 0xb5f7aec0 in UniversalSlot::qt_invoke (this=0x830d430, id=2,
qargs=<value optimized out>)
at /build/buildd/python-qt3-3.17.4/sip/qt/qobject.sip:1180
1180 arg =
sipConvertFromMappedType((void
*)static_QUType_ptr.get(qargs),psig->sg_args[a].u.mt,0);
And it is this place:
(gdb) l
1178 case mtype_sat:
1179 case mtypep_sat:
1180 arg =
sipConvertFromMappedType((void
*)static_QUType_ptr.get(qargs),psig->sg_args[a].u.mt,0);
1181 break;
I attach full backtrace and minimal testcase which shows the problem.
If there is any other info needed (system configuration, contents of
variables on stack, etc.), let me know, I will be glad to provide it.
BTW. Is there any workaround for this problem? Like putting KFileItems
in some other sequence type? Would that help? I need to emit such list
in my application and there is little chance the fix would go into
Hardy repository any time soon...
Regards
--
Krzysztof Lichota
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testkfileitemlist.py
Type: text/x-python
Size: 824 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20081015/ceb641c6/testkfileitemlist.py
-------------- next part --------------
Program terminated with signal 11, Segmentation fault.
[New process 14945]
#0 0x0830d7e7 in ?? ()
(gdb) thread apply all bt
Thread 1 (process 14945):
#0 0x0830d7e7 in ?? ()
#1 0xb5f7aec0 in UniversalSlot::qt_invoke (this=0x830d430, id=2, qargs=<value optimized out>)
at /build/buildd/python-qt3-3.17.4/sip/qt/qobject.sip:1180
#2 0xb71cd704 in QObject::activate_signal (this=0x830b7b0, clist=0x830d870, o=0xbff2a0c4) at kernel/qobject.cpp:2359
#3 0xb7859eb1 in KDirLister::newItems (this=0x830b7b0, t0=@0x832cb98) at ./kdirlister.moc:312
#4 0xb785ae9b in KDirLister::emitItems (this=0x830b7b0) at /build/buildd/kdelibs-3.5.9/./kio/kio/kdirlister.cpp:2314
#5 0xb78994b6 in KDirListerCache::slotEntries (this=0x830ac58, job=0x830ed90, entries=@0xbff2a538)
at /build/buildd/kdelibs-3.5.9/./kio/kio/kdirlister.cpp:996
#6 0xb78a5e6f in KDirListerCache::qt_invoke (this=0x830ac58, _id=6, _o=0xbff2a220) at ./kdirlister_p.moc:131
#7 0xb71cd704 in QObject::activate_signal (this=0x830ed90, clist=0x831e668, o=0xbff2a220) at kernel/qobject.cpp:2359
#8 0xb77d440b in KIO::ListJob::entries (this=0x830ed90, t0=0x830ed90, t1=@0xbff2a538) at ./jobclasses.moc:1733
#9 0xb7820a58 in KIO::ListJob::slotListEntries (this=0x830ed90, list=@0xbff2a538)
at /build/buildd/kdelibs-3.5.9/./kio/kio/job.cpp:2057
#10 0xb7831750 in KIO::ListJob::qt_invoke (this=0x830ed90, _id=19, _o=0xbff2a3b4) at ./jobclasses.moc:1771
#11 0xb71cd704 in QObject::activate_signal (this=0x83223a8, clist=0x8321018, o=0xbff2a3b4) at kernel/qobject.cpp:2359
#12 0xb77d7f81 in KIO::SlaveInterface::listEntries (this=0x83223a8, t0=@0xbff2a538) at ./slaveinterface.moc:255
#13 0xb781b8c9 in KIO::SlaveInterface::dispatch (this=0x83223a8, _cmd=106, rawdata=@0xbff2a570)
at /build/buildd/kdelibs-3.5.9/./kio/kio/slaveinterface.cpp:263
#14 0xb783de4a in KIO::SlaveInterface::dispatch (this=0x83223a8)
at /build/buildd/kdelibs-3.5.9/./kio/kio/slaveinterface.cpp:173
#15 0xb77e4d7c in KIO::Slave::gotInput (this=0x83223a8) at /build/buildd/kdelibs-3.5.9/./kio/kio/slave.cpp:300
#16 0xb7813278 in KIO::Slave::qt_invoke (this=0x83223a8, _id=4, _o=0xbff2a670) at ./slave.moc:113
#17 0xb71cd704 in QObject::activate_signal (this=0x8321d98, clist=0x829aa68, o=0xbff2a670) at kernel/qobject.cpp:2359
#18 0xb71ce051 in QObject::activate_signal (this=0x8321d98, signal=2, param=11) at kernel/qobject.cpp:2452
#19 0xb755db99 in QSocketNotifier::activated (this=0x8321d98, t0=11) at .moc/debug-shared-mt/moc_qsocketnotifier.cpp:85
#20 0xb71ef766 in QSocketNotifier::event (this=0x8321d98, e=0xbff2a9c0) at kernel/qsocketnotifier.cpp:261
#21 0xb7161c36 in QApplication::internalNotify (this=0x826fe78, receiver=0x8321d98, e=0xbff2a9c0)
at kernel/qapplication.cpp:2638
#22 0xb7163a5f in QApplication::notify (this=0x826fe78, receiver=0x8321d98, e=0xbff2a9c0) at kernel/qapplication.cpp:2361
#23 0xb6751672 in KApplication::notify (this=0x826fe78, receiver=0x8321d98, event=0xbff2a9c0)
at /build/buildd/kdelibs-3.5.9/./kdecore/kapplication.cpp:550
#24 0xb5c167d1 in sipKApplication::notify () from /usr/lib/python2.5/site-packages/kdecore.so
#25 0xb70f228d in QApplication::sendEvent (receiver=0x8321d98, event=0xbff2a9c0) at ../include/qapplication.h:523
#26 0xb7153b4a in QEventLoop::activateSocketNotifiers (this=0x82a70d0) at kernel/qeventloop_unix.cpp:581
#27 0xb7107630 in QEventLoop::processEvents (this=0x82a70d0, flags=4) at kernel/qeventloop_x11.cpp:386
#28 0xb717cf90 in QEventLoop::enterLoop (this=0x82a70d0) at kernel/qeventloop.cpp:201
#29 0xb717cc8e in QEventLoop::exec (this=0x82a70d0) at kernel/qeventloop.cpp:148
#30 0xb71637df in QApplication::exec (this=0x826fe78) at kernel/qapplication.cpp:2761
#31 0xb62f4058 in meth_QApplication_exec_loop (sipSelf=0xb5ce05ec, sipArgs=0xb7d2502c) at sipqtpart33.cpp:2377
#32 0x080c9ab3 in PyEval_EvalFrameEx (f=0x817636c, throwflag=0) at ../Python/ceval.c:3573
#33 0x080cb1f7 in PyEval_EvalCodeEx (co=0xb7ced6e0, globals=0xb7d3eacc, locals=0xb7d3eacc, args=0x0, argcount=0, kws=0x0,
kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:2836
#34 0x080cb347 in PyEval_EvalCode (co=0xb7ced6e0, globals=0xb7d3eacc, locals=0xb7d3eacc) at ../Python/ceval.c:494
---Type <return> to continue, or q <return> to quit---
#35 0x080ea818 in PyRun_FileExFlags (fp=0x816b008, filename=0xbff2bd14 "testkfileitemlist.py", start=257,
globals=0xb7d3eacc, locals=0xb7d3eacc, closeit=1, flags=0xbff2b018) at ../Python/pythonrun.c:1273
#36 0x080eaab9 in PyRun_SimpleFileExFlags (fp=0x816b008, filename=0xbff2bd14 "testkfileitemlist.py", closeit=1,
flags=0xbff2b018) at ../Python/pythonrun.c:879
#37 0x08059335 in Py_Main (argc=2, argv=0xbff2b0e4) at ../Modules/main.c:523
#38 0x080587f2 in main (argc=5316, argv=0x30cf3000) at ../Modules/python.c:23
(gdb)
More information about the PyQt
mailing list