PDA

View Full Version : "Cannot move to target thread"



Pepe
24th July 2007, 19:45
I compiled my application statically in Windows, using Qt 4.2.3.

It works, but it gives a lot of warnings:

WARNING: QObject::moveToThread: Current thread (0124C6D0) is not the object's thread (003F7318).
Cannot move to target thread (003F7318)

What does that mean?
Could it be a problem?

BTW, my application doesn't use threads.

marcel
24th July 2007, 19:54
Are you confident that you don't use threads?
Because it sure looks like you do.

moveToThread is used to change the affinity of a QObject. It moves the object in another thread's context.

Could you post some parts of the sources?

Regards

Pepe
24th July 2007, 20:24
No, I'm not using threads (I don't even know how to do it).

I think this warning comes from QProcess. Previously I was using Q3Process and that warning didn't appear.

marcel
24th July 2007, 20:39
That's it.
How do you use QProcess?
What do you do with it?

Pepe
24th July 2007, 23:37
I launch a console application, read its output (connecting readyReadStandardOutput to a slot), and also write to sdtin.

BTW, uic3 also produces those warnings.

I just did what the docs say about building Qt statically:

cd %QTDIR%
configure -static
make sub-src

Previously those warnings didn't appear.

gri
25th July 2007, 14:12
I also have these messages. They only happen if you link statically but only if you have compiled Qt's dynamic version before!

Qt loads the Jpeg and Png plugin which causes this message. So if you remove the dynamic libraries (which causes your designer/assistant to not work anymore :( ) you'll not get these messages anymore ...

mnemonic_fx
13th August 2007, 10:58
I also have these messages. They only happen if you link statically but only if you have compiled Qt's dynamic version before!

Qt loads the Jpeg and Png plugin which causes this message. So if you remove the dynamic libraries (which causes your designer/assistant to not work anymore :( ) you'll not get these messages anymore ...

I never link Qt statically, and this happens to me too.