[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] cannot move to target thread
From:       Scott Frankel <frankel () circlesfx ! com>
Date:       2009-08-25 15:53:18
Message-ID: 02799A76-61AD-4ED0-BBA8-23E9F6235E48 () circlesfx ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello,

Pardon the cross-post and tangential subject matter.  My PyQt-QPSQL  
app dies on OSX, yielding the following error:  "Cannot move to target  
thread."  Linux and Windows builds behave properly.  I've rebuilt my  
macports environment from scratch, googled myself silly, and poked and  
prodded my environment for several weeks.  If someone here has any  
insight to offer on how I can rectify the problem, I'd be grateful.

I've traced the problem to a py2app options include of PyQt4.QtSql.   
My app requires QPSQL, though tests with QSQLITE also yield the same  
error.

Setting the DYLD_PRINT_LIBRARIES env var, yields the following output  
on app launch:

...
Qt Version:    4.5.2
PyQt Version:  4.5.4
dyld: loaded: /opt/local/libexec/qt4-mac/plugins/sqldrivers/ 
libqsqlpsql.bundle
dyld: loaded: /opt/local/lib/postgresql83/libpq.5.dylib
dyld: loaded: /opt/local/libexec/qt4-mac/lib/QtSql.framework/Versions/ 
4/QtSql
dyld: loaded: /opt/local/libexec/qt4-mac/lib/QtCore.framework/Versions/ 
4/QtCore
dyld: loaded: /opt/local/lib/libz.1.dylib
dyld: loaded: /opt/local/lib/libssl.0.9.8.dylib
dyld: loaded: /opt/local/lib/libcrypto.0.9.8.dylib
QObject::moveToThread: Current thread (0x1da760) is not the object's  
thread (0x1b1b10).
Cannot move to target thread (0x1b1b10)

On Mac OS X, you might be loading two sets of Qt binaries into the  
same process. Check that all plugins are compiled against the right Qt  
binaries. Export DYLD_PRINT_LIBRARIES=1 and check that only one set of  
binaries are being loaded.
...



My macports environment looks like this:

...
  postgresql83 @8.3.1_0 (active)
...
  py26-altgraph @0.6.7_0 (active)
  py26-bdist_mpkg @0.4.4_0 (active)
  py26-macholib @1.2_0 (active)
  py26-modulegraph-devel @0.7.2_0 (active)
  py26-py2app-devel @0.4.2_1 (active)
  py26-pyqt4 @4.5.4_0 (active)
  py26-setuptools @0.6c9_0 (active)
  py26-sip @4.8.2_0 (active)
...
  qt4-mac @4.5.2_1+psql (active)
...


Any thoughts or suggestions?

Thanks!
Scott



[Attachment #5 (text/html)]

<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
-webkit-line-break: after-white-space; \
"><div><br></div>Hello,<div><br></div><div>Pardon the cross-post and tangential \
subject matter. &nbsp;My PyQt-QPSQL app dies on OSX, yielding the following error: \
&nbsp;"Cannot move to target thread." &nbsp;Linux and Windows builds behave properly. \
&nbsp;I've rebuilt my macports environment from scratch, googled myself silly, and \
poked and prodded my environment for several weeks. &nbsp;If someone here has any \
insight to offer on how I can rectify the problem, I'd be \
grateful.</div><div><br></div><div>I've traced the problem to a py2app options \
include of PyQt4.QtSql. &nbsp;My app requires QPSQL, though tests with QSQLITE also \
yield the same error.&nbsp;</div><div><br>Setting the DYLD_PRINT_LIBRARIES env var, \
yields the following output on app launch:<br><br></div><div>...<br>Qt Version: \
&nbsp;&nbsp;&nbsp;4.5.2<br>PyQt Version: &nbsp;4.5.4<br>dyld: loaded: \
/opt/local/libexec/qt4-mac/plugins/sqldrivers/libqsqlpsql.bundle<br>dyld: loaded: \
/opt/local/lib/postgresql83/libpq.5.dylib<br>dyld: loaded: \
/opt/local/libexec/qt4-mac/lib/QtSql.framework/Versions/4/QtSql<br>dyld: loaded: \
/opt/local/libexec/qt4-mac/lib/QtCore.framework/Versions/4/QtCore<br>dyld: loaded: \
/opt/local/lib/libz.1.dylib<br>dyld: loaded: \
/opt/local/lib/libssl.0.9.8.dylib<br>dyld: loaded: \
/opt/local/lib/libcrypto.0.9.8.dylib<br>QObject::moveToThread: Current thread \
(0x1da760) is not the object's thread (0x1b1b10).<br>Cannot move to target thread \
(0x1b1b10)<br><br>On Mac OS X, you might be loading two sets of Qt binaries into the \
same process. Check that all plugins are compiled against the right Qt binaries. \
Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being \
loaded.</div><div>...<br><br><br></div><div><br>My macports environment looks like \
this:<br><br>...<br>&nbsp;postgresql83 @8.3.1_0 \
(active)<br>...<br>&nbsp;py26-altgraph @0.6.7_0 (active)<br>&nbsp;py26-bdist_mpkg \
@0.4.4_0 (active)<br>&nbsp;py26-macholib @1.2_0 \
(active)<br>&nbsp;py26-modulegraph-devel @0.7.2_0 (active)<br>&nbsp;py26-py2app-devel \
@0.4.2_1 (active)<br>&nbsp;py26-pyqt4 @4.5.4_0 (active)<br>&nbsp;py26-setuptools \
@0.6c9_0 (active)<br>&nbsp;py26-sip @4.8.2_0 (active)<br>...<br>&nbsp;qt4-mac \
@4.5.2_1+psql (active)<br>...<br><br><br>Any thoughts or \
suggestions?<br><br>Thanks!<br>Scott<br><br><font class="Apple-style-span" \
color="#144FAE"><font class="Apple-style-span" \
color="#000000"><br></font></font></div></body></html>



_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic