[Interest] DBus multithreading problems with Qt 4.8

Thiago Macieira thiago.macieira at intel.com
Sat Mar 10 15:43:13 CET 2012

On sexta-feira, 9 de março de 2012 22.10.12, christian_weilbach at web.de wrote:
> Hi,
> I have tried to debug a problem for some months in my KDE ioslave in
> KTorrent. It basically exposes the DBus interface of KTorrent to provide
> IO- functionality for all KDE/Qt-apps for magnet-bittorrent-links in a new
> URL shema. (1)
> It has worked fine (besides some occasional hickups) for Qt 4.7, but
> suddenly stopped working when switching to Qt 4.8. I have only recognized
> it because it stopped working on Fedora 16, which was like Kubuntu 11.10
> KDE 4.7 and DBus 1.4, but had Qt 4.8 already deployed. I don't get an
> error, I simply don't get the signals from KTorrent in the event loop of
> DBusHandler. (2) See line 212 for the lost signals and (3) for the
> KIO-slave, it is run from DBusThread (4). To build the slave you need to
> enable it in cmake by setting the
> ENABLE_KIO_MAGNET option to "true". Test it on a free torrent. (5)
> Nobody can help me on #kde-devel or the kde-devel list and I am out of
> ideas. What can I do to make it work again? I am likely doing it wrong, but
> am stuck. Has anything significant changed in Qt 4.8 in this regard?

I don't see any changes between 4.7.4 and 4.8.0 related to threading. So I 
need a testcase.

Also, you're looking at several different processes at the same time. Please 
try to reduce to ONE.

You say that you're not getting the signal. There are three possibilities for 
that, and you will need to narrow it down before we proceed:

 - sender process did not send it
 - receiver process did not receive it
 - receiver process received it, but the slot wasn't called

To verify if the signal was sent, use dbus-monitor. To verify if the receiver 
process received it, run the receiver application with QDBUS_DEBUG=1 (you need 
a debug build of QtDBus).

Please reduce the problem to a one-application testcase and tell me which of 
the three circumstances above the problem is.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120310/d4ae2312/attachment.sig>

More information about the Interest mailing list