[Kde-hardware-devel] Solid Multithreading: Cannot create children for a parent ...

Volker Lanz vl at fidra.de
Wed Mar 3 20:50:58 CET 2010


Hi all,

in Partition Manager I stumbled across a multithreading problem that seems to 
be related somehow to solid: I try to scan for devices in a separate thread 
and show a KProgressDialog in the meantime.

Later on the user might open a file via a KFileDialog. If run as an ordinary 
user this works but triggers a number of those:

QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::Hal::HalDevice(0x1ee1780), parent's thread is 
QThread(0x1ebc9c0), current thread is QThread(0x1d9f470)

For root the KFileDialog gets all upset about dying protocols and becomes 
unusable.

The attached test case reproduces the problem. If you swap the deleting of the 
thread object and the call to KFileDialog::getOpenFileName, the problem 
disappears.

I can probably work around it somehow in Partition Manager, but it still seems 
like an issue to be taken seriously to me.

It also seems related to:

http://lists.kde.org/?l=kde-hardware-devel&m=120275510216181

but this just locks up for me and does NOT produce the warnings.

Cheers,

Volker

-- 
Volker Lanz
http://www.volker-lanz.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMakeLists.txt
Type: text/x-cmake
Size: 357 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20100303/eb5afb1a/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: solidthread.cpp
Type: text/x-c++src
Size: 690 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20100303/eb5afb1a/attachment.cpp 


More information about the Kde-hardware-devel mailing list