I am having a problem with SLIME getting disconnected from the Lisp process when requiring certain libraries. I am using clbuild to manage my Lisp implementation and SLIME itself. The problem is that when I do (require 'cl-opengl) in SLIME, I get the message "Lisp connection closed unexpectedly: connection broken by remote peer" in the mini-buffer area. I set swank:*log-events* to t and tried, and unfortunately that was not terribly helpful. Here are the lines generated by the require cl-opengl line:
===== dispatch-event: (:EMACS-REX (SWANK:OPERATOR-ARGLIST "require" "COMMON-LISP-USER") "COMMON-LISP-USER" :REPL-THREAD 15) send-event: #<SB-THREAD:THREAD "repl-thread" RUNNING {10030E2AE1}> (:EMACS-REX (SWANK:OPERATOR-ARGLIST "require" "COMMON-LISP-USER") "COMMON-LISP-USER" 15) wait-for-event: (COMMON-LISP:OR (:EMACS-REX . SWANK::_) (:EMACS-CHANNEL-SEND . SWANK::_)) NIL dispatch-event: (:RETURN #<SB-THREAD:THREAD "repl-thread" RUNNING {10030E2AE1}> (:OK "(require MODULE-NAME &OPTIONAL PATHNAMES)") 15) encode-message decode-message dispatch-event: (:EMACS-REX (SWANK:LISTENER-EVAL "(require 'cl-opengl) ") "COMMON-LISP-USER" :REPL-THREAD 16) send-event: #<SB-THREAD:THREAD "repl-thread" RUNNING {10030E2AE1}> (:EMACS-REX (SWANK:LISTENER-EVAL "(require 'cl-opengl) ") "COMMON-LISP-USER" 16) /Users/jay/Applications/clbuild/clbuild: line 450: 11820 Trace/BPT trap ${lisp} $common_options $eval "$require_asdf" $eval "$set_central_registry" $eval "$EXTRA_CLIM_FEATURES" "$@"
Process inferior-lisp exited abnormally with code 133 =====
I am using the following software:
* Mac OS X 10.6.4 * SBCL 1.0.42.52 (checked out by clbuild and built) * GNU Emacs 23.1.50.1 (x86_64-apple-darwin10.2.0, NS apple-appkit-1038.25) from MacPorts * SLIME from CVS via clbuild * cl-opengl from git via clbuild
I have looked at line 450 of clbuild and it is just the call to launch SBCL. I find no more information about the Trace/BPT trap. I have also tried to find the meaning of the exit code, but have been unsuccessful. If I run clbuild lisp (which runs SBCL without SLIME) the require works fine. Obviously, SLIME provides a much nicer working environment, so it would be great to get it working.
I would greatly appreciate any suggestions on possible solutions or about how to debug this further.
Thanks and regards,
* J. Bromley [2010-09-27 09:12] writes:
I have looked at line 450 of clbuild and it is just the call to launch SBCL. I find no more information about the Trace/BPT trap. I have also tried to find the meaning of the exit code, but have been unsuccessful. If I run clbuild lisp (which runs SBCL without SLIME) the require works fine. Obviously, SLIME provides a much nicer working environment, so it would be great to get it working.
This sounds like the issue discussed here: http://clozure.com/pipermail/openmcl-devel/2010-August/011773.html i.e. the problem is that you load OpenGL in a non-main thread.
I would greatly appreciate any suggestions on possible solutions or about how to debug this further.
If you set (setq swank:*communication-style* nil) or :fd-handler in your ~/.swank.lisp SLIME will run single-threaded. [But it might be necessary to somehow integrate SLIME in the event loop that drives OpenGL.]
Helmut