Qt-interest Archive, February 2007
Re: spurious QObject::moveToThread errors on Mac
Message 1 in thread
Just wanted to say that the Mac issue in my case was fixed by putting an empty
qt.conf file in the qassistant.app/Contents/Resources directory when I
bundled the assistant into my application bundle.
The assistant was picking up the image plugins, that I hadn't bundled because
I didn't need them.
Clint
On Tuesday 23 January 2007 2:35 pm, clinton@xxxxxxxxxxxx wrote:
> 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
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body. List archive and information:
> http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]
Message 2 in thread
Hi Folks,
> Just wanted to say that the Mac issue in my case was fixed by putting
an
> empty
> qt.conf file in the qassistant.app/Contents/Resources directory when I
> bundled the assistant into my application bundle.
> The assistant was picking up the image plugins, that I hadn't bundled
> because
> I didn't need them.
i'm experiencing similar issues here (Windows XP, using Qt as static
libraries, but .dlls and plugins can still be found on the system)
it seems this problem arises when 2 different builds of Qt are
dynamically linked together (by the plugin loader).
A workaround would be defining QT_NO_LIBRARY while building Qt and thus
completely disabling QLibrary (which includes loading of plugins).
i've been talking to support@xxxxxxxxxxxxx, and they say it's a bug.
(will be task 149912 - but not visible yet in tasktracker)
Peter Prade
VRmagic GmbH
Augustaanlage 32
68165 Mannheim, Germany
+49 621 400 416 36
www.vrmagic.com
P.S.
> > > QObject::moveToThread: Current thread (xxx) is not the object's
thread
> > > (xxx). Cannot move to target thread (xxx).
did anyone notice that current thread is the same as target thread in
that message? at least this was true for me. looking at the code left me
puzzled why this case wouldn't be catched in the beginning of the
function.
--
[ signature omitted ]