Qt-interest Archive, January 2007
spurious QObject::moveToThread errors on Mac
Message 1 in thread
In my Mac application, I get a bunch of messages of the type:
QObject::moveToThread: Current thread (xxx) is not the object's thread
(xxx). Cannot move to target thread (xxx).
I'm not calling this function anywhere in my code, nor am I even
creating any threads.
This doesn't happen on Windows.
What could be causing this?
--
[ signature omitted ]
Message 2 in thread
On Tuesday 23 January 2007 2:26 pm, Paul Miller wrote:
> In my Mac application, I get a bunch of messages of the type:
>
> QObject::moveToThread: Current thread (xxx) is not the object's thread
> (xxx). Cannot move to target thread (xxx).
>
> I'm not calling this function anywhere in my code, nor am I even
> creating any threads.
>
> This doesn't happen on Windows.
>
> What could be causing this?
I saw this a couple weeks ago when putting the assistant into the bundle of an
application.
Using gdb to run the assistant from the debugger, and doing
"info sharedlibrary" showed that two instances of the QtCore & QtGui libraries
were loaded, one from within the bundle, and one from outside the bundle.
That would explain the confusing thread state when when more than one instance
of globals exist to help manage Qt's thread state.
I don't know how to resolve that. I tried "otool -L" on all the binaries and
made sure DYLD_LIBRARY_PATH wasn't set, but couldn't find why it was still
loading the external Qt libraries. Renaming the directory where those
external Qt libs lived supressed the messages, and the app ran fine.
Maybe that's what you're seeing. Anyone have ideas?
Stumped,
Clint
--
[ signature omitted ]
Message 3 in thread
"Paul Miller" <paul@xxxxxxxxxx> wrote in message
news:45B67D78.4050501@xxxxxxxxxxxxx
> In my Mac application, I get a bunch of messages of the type:
>
> QObject::moveToThread: Current thread (xxx) is not the object's thread
> (xxx). Cannot move to target thread (xxx).
>
> I'm not calling this function anywhere in my code, nor am I even creating
> any threads.
>
> This doesn't happen on Windows.
>
> What could be causing this?
>
> --
> Paul Miller | paul@xxxxxxxxxx | www.fxtech.com | Got Tivo?
>
I noticed the same thing on Windows XP when calling load() on a QImage.
QT4.2.2, Microsoft Visual Studio 2005 (8.0)
QObject::moveToThread: Current thread (0369CFB8) is not the object's thread
(02E2AE78).
Cannot move to target thread (02E2AE78)
Like you, I'm not creating any threads.
--
[ signature omitted ]
Message 4 in thread
On Tuesday 23 January 2007 22:26, Paul Miller wrote:
> In my Mac application, I get a bunch of messages of the type:
>
> QObject::moveToThread: Current thread (xxx) is not the object's thread
> (xxx). Cannot move to target thread (xxx).
I had this too.
Since the same code compiled on Linux (various flavours) with a
qt ./configured exactly the same way and being the same version didn't gave
me the output, I added an issue on the task tracker.
Trolltech could not reproduce it and in the end I rebuild and installed the Qt
(same version) again unpacking the archive freshly.
Since then, the messages are gone.
I vaguely remember that I interupted the building the first time round
(sending the mac into suspend).
I know it sounds strange but try to rebuild your installation.
Cheers,
Meinhard
--
[ signature omitted ]