Results 1 to 7 of 7

Thread: "Cannot move to target thread"

  1. #1
    Join Date
    Mar 2007
    Posts
    58
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default "Cannot move to target thread"

    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.

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: "Cannot move to target thread"

    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

  3. #3
    Join Date
    Mar 2007
    Posts
    58
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: "Cannot move to target thread"

    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.

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: "Cannot move to target thread"

    That's it.
    How do you use QProcess?
    What do you do with it?

  5. #5
    Join Date
    Mar 2007
    Posts
    58
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: "Cannot move to target thread"

    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.

  6. #6
    Join Date
    Jan 2007
    Location
    Augsburg, Germany
    Posts
    75
    Thanks
    4
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: "Cannot move to target thread"

    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 ...

  7. #7
    Join Date
    Mar 2007
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: "Cannot move to target thread"

    Quote Originally Posted by gri View Post
    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.