Multithreading with QtDBus

Ogden, Nick nick.ogden at usa.g4s.com
Thu Nov 1 07:14:11 PDT 2012


Greetings,

I have a program that does the following:
1) Creates a QCoreApplication
2) Creates a third party component (read: black box) which internally spawns multiple threads
3) Creates a QDBusConnection and connects to some DBus signals
4) Enters the main Qt event loop

>From here onwards, the third party black box makes calls, on whatever thread it feels is appropriate, to some handler functions in the application, that are required to retrieve some data via DBus. Each thread creates its own proxy object and makes a blocking call over DBus by means of QDBusPendingReply::waitForFinished(). These proxy objects share the same underlying QDBusConnection object.

My first question is whether or not this usage scenario is supported / expected to work with QtDBus?

I am experiencing frequent crashes from deep in libdbus-1 when running this application on Windows (I have not tested on Linux etc). I have attached a small test case which is representative of the usage scenario and reproduces this crash 100% of the time. Could someone please confirm whether this is a bug, or an unsupported use case for QtDBus and I will file a bug report as appropriate.

Kind Regards
--
Nick Ogden
Software Engineer
G4S Technology Ltd.

nick.ogden at g4tec.com<mailto:nick.ogden at g4tec.com>
www.g4stechnology.com<http://www.g4stechnology.com/>
Challenge House,
International Drive,
Tewkesbury,
Gloucestershire,
GL20 8UQ, UK

P Please consider the environment before printing this email


________________________________
The details of this company are as follows:
G4S Technology Limited, Registered Office: Challenge House, International Drive, Tewkesbury, Gloucestershire GL20 8UQ, Registered in England No. 2382338.

This communication may contain information which is confidential, personal and/or privileged.

It is for the exclusive use of the intended recipient(s).
If you are not the intended recipient(s), please note that any distribution, forwarding, copying or use of this communication or the information in it is strictly prohibited.

Any personal views expressed in this e-mail are those of the individual sender and the company does not endorse or accept responsibility for them.

Prior to taking any action based upon this e-mail message, you should seek appropriate confirmation of its authenticity.

This e-mail has been scanned for all viruses by MessageLabs.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20121101/7d689149/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestCase.zip
Type: application/x-zip-compressed
Size: 1162 bytes
Desc: TestCase.zip
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20121101/7d689149/attachment.bin>


More information about the dbus mailing list