Am 26.04.14 18:25 schrieb "Stas Boukarev" unter <stassats(a)gmail.com>:
>Ivan Shvedunov <ivan4th(a)gmail.com> writes:
>
>> Unfortunately it seems to be a problem with Mac OS X,
>> see comments for https://bugreports.qt-project.org/browse/QTBUG-7393
>> Seems like the only fix is to run QApplication from the main
>> thread which doesn't seem to be possible with threaded SBCL.
>> Not sure whether there are other workarounds :(
>It is possible with threaded SBCL, the initial REPL thread is the main
>thread.
So ...
After having spent the better part of this day getting CommonQt to tun on
OS X there's a couple of points to note:
Do not follow any other info than that on CommonQt's Homepage. It will
cause you trouble, especially if you are on OS X. ;-)
The other point is related to the thread challenge I encountered. And yes,
multi-threaded SBCL is able to run CommonQt on OS X if
1. You change file repl-integration.lisp line 106 from "initial thread" to
"main thread" and recompile and reload the qt package.
2. You don't use Slime to interact with your REPL.
The second is a real PITA. So I tried digging up a solution. The qt-repp
package seemed the right thing to use. Nope:
(ql:quickload :qt-repl)
(qt-repl:start-gui-thread)
Lisp output:
WARNING: QApplication was not created in the main() thread.
Using qt-repl:eval-in-gui-thread (with the mods described above) then
tries to execute the evaluation in the guy thread. But no, this doesn't
work:
Lisp output:
QCoreApplication::exec: The event loop is already running
Slime repl output:
CL-USER> (qt-repl:eval-in-gui-thread (qt-conv:main))
-1
and that's where I am stuck now. Further digging or suggestions are in
order ;-)
Thanks to Stas and Ivan for the support so far!
Regards
Frank
Me again ...
Doing
(ql:quickload :qt)
(qt:ensure-smoke :qtcore)
(qt:ensure-smoke :qtgui)
(ql:quickload :qt-tutorial)
and finally
(qt-conv:main)
results in the following errors:
SBCL error output: http://paste.lisp.org/+31SS
SBCL backtrace: http://paste.lisp.org/+31ST
Ok, so maybe I am running into issues as described on "Known issues",
"Callbacks from threads" - am I?
Thanks again for looking at this.
Regards
Frank
Am 26.04.14 11:20 schrieb "Stas Boukarev" unter <stassats(a)gmail.com>:
>Frank Goenninger <frgo(a)me.com> writes:
>>SBCL error output: http://paste.lisp.org/+31SS
>>SBCL backtrace: http://paste.lisp.org/+31ST
>There's no callbacks from threads here. Make sure that libsmoke and
>libcommonqt were compiled and are using the same version of Qt.
Maybe I'm misinterpreting something, but this line
1: ("foreign function: call_into_lisp")
from the backtrace as shown in the lisp paste is a callback from C to Lisp
for me. And right in that function hell starts ...
To be honest I haven't looked at the sources of Qt yet (I don't have them
installed as my disk space is a scarce resource).
I am still hoping for someone having had the same problem.
Thanks again for helping out.
Kind regards
Frank