1

I have been trying to get slimv (http://www.vim.org/scripts/script.php?script_id=2531) working for a while now, but I am really not sure what else I can do.

I am running vim 7.3 compiled with python support, using clisp (sbcl is showing the same issue though) on os x lion. I pulled the latest version of slimv off of vim.org.

When I load a lisp file, echo g:slimv_loaded returns 1, but I do not get a second window with the repl. When I hit any of the keybindings, a new terminal window opens, starts clisp, and returns the following

; Loading file /Users/pdk/.vim/slime/start-swank.lisp ...
;;  Loading file /Users/pdk/.vim/slime/swank-loader.lisp ...
WARNING: No architecture feature found in
     (POWERPC PPC X86 X86-64 X86_64 AMD64 I686 I586 I486 PC386 IAPX386
     SPARC64 SPARC
     HPPA64 HPPA ARM PENTIUM3 PENTIUM4 JAVA-1.4 JAVA-1.5 JAVA-1.6
     JAVA-1.7).
;;  Loaded file /Users/pdk/.vim/slime/swank-loader.lisp
;;  Loading file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/swank-backend.fas ...
;;  Loaded file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/swank-backend.fas
;;  Loading file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/xref.fas ...
;;  Loaded file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/xref.fas
;;  Loading file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/metering.fas ...
;;  Loaded file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/metering.fas
;;  Loading file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/swank-clisp.fas ...
WARNING: DEFUN/DEFMACRO: redefining function BREAK in
         /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/swank-clisp.fas,
         was defined in
         /private/tmp/homebrew-clisp-2.49-LWCF/clisp-2.49/src/condition.fas
WARNING: Replacing method #<STANDARD-METHOD (#<BUILT-IN-CLASS T>)> in
         #<STANDARD-GENERIC-FUNCTION EMACS-INSPECT>
;;  Loaded file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/swank-clisp.fas
;;  Loading file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/swank-gray.fas ...
WARNING: The generic function #<STANDARD-GENERIC-FUNCTION STREAM-WRITE-CHAR>
         is being modified, but has already been called.
WARNING: The generic function #<STANDARD-GENERIC-FUNCTION STREAM-LINE-COLUMN>
         is being modified, but has already been called.
WARNING: The generic function #<STANDARD-GENERIC-FUNCTION STREAM-FORCE-OUTPUT>
         is being modified, but has already been called.
WARNING: The generic function #<STANDARD-GENERIC-FUNCTION STREAM-LINE-COLUMN>
         is being modified, but has already been called.
;;  Loaded file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/swank-gray.fas
;;  Loading file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/swank-match.fas ...
;;  Loaded file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/swank-match.fas
;;  Loading file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/swank-rpc.fas ...
;;  Loaded file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/swank-rpc.fas
;;  Loading file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/swank.fas ...
;;  Loaded file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/swank.fas
WARNING: These Swank interfaces are unimplemented:
         (ACTIVATE-STEPPING ADD-FD-HANDLER ADD-SIGIO-HANDLER
         BACKGROUND-SAVE-IMAGE
         DISASSEMBLE-FRAME DUP EXEC-IMAGE FRAME-CALL INTERRUPT-THREAD
         MAKE-FD-STREAM
         RECEIVE-IF REMOVE-FD-HANDLERS REMOVE-SIGIO-HANDLERS SEND
         SLDB-BREAK-AT-START
         SLDB-BREAK-ON-RETURN SLDB-STEP-INTO SLDB-STEP-NEXT SLDB-STEP-OUT
         SOCKET-FD
         SPAWN TOGGLE-TRACE)
;;  Loading file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/contrib/swank-c-p-c.fas ...
;;  Loaded file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/contrib/swank-c-p-c.fas
;;  Loading file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/contrib/swank-arglists.fas ...
;;  Loaded file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/contrib/swank-arglists.fas
;;  Loading file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/contrib/swank-fuzzy.fas ...
;;  Loaded file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/contrib/swank-fuzzy.fas
;;  Loading file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/contrib/swank-fancy-inspector.fas ...
;;  Loaded file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/contrib/swank-fancy-inspector.fas
;;  Loading file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/contrib/swank-presentations.fas ...
;;  Loaded file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/contrib/swank-presentations.fas
;;  Loading file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/contrib/swank-presentation-streams.fas ...
;;  Loaded file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/contrib/swank-presentation-streams.fas
;;  Loading file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/contrib/swank-package-fu.fas ...
;;  Loaded file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/contrib/swank-package-fu.fas
;;  Loading file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/contrib/swank-hyperdoc.fas ...
;;  Loaded file /Users/pdk/.slime/fasl/2011-03-13/clisp-2.49-unix-unknown/contrib/swank-hyperdoc.fas
;; Swank started at port: 4005.
CL-USER> 
;; swank:close-connection: 
READ: input stream #<IO UNBUFFERED SOCKET-STREAM CHARACTER 0.0.0.0:4005> has reached its end

;; swank:close-connection: NIL

simultaneously, the original terminal window closes vim, and shows this

tab 1 of window id 57924
Vim: Caught deadly signal SEGV

Vim: Finished.
[1]    83648 segmentation fault  vim foo.lisp

Any ideas what I can do?

Tamas Kovacs
  • 1,495
  • 7
  • 9
Patrick
  • 13,872
  • 5
  • 35
  • 53

2 Answers2

1

I've just received the following information from the macvim developer:

It seems this is a 64 bit issue -- compiling MacVim 32 bit appears to fix it. Please compile a 32 bit version. Build instructions are here, in order to build 32 bit the "configure" line must include the flag "--with-macarchs=i386".

Tamas Kovacs
  • 1,495
  • 7
  • 9
  • Awesome, tamas. I was finally able to get it working. I have been using vanilla vim, and am still not able to get it working there, but macvim is close enough. – Patrick Nov 10 '11 at 07:12
  • Is there any progress on making this work with a 64bit compiled MacVim? Compiling 32 bit brings about problems with language support for other languages. – Tempire Mar 02 '12 at 04:50
  • Nothing I have heard of, but I have no connection with MacVim, so you should ask the MacVim maintainer. – Tamas Kovacs Mar 02 '12 at 22:16
0
  • If you change log = True in line 32 of swank.py, then Slimv writes a logfile called swank.log containing the communication data between the swank client and the server. This may be used to check for any swank protocol problems. You can send the logfile to the author of Slimv (that's me:) for analysis.
  • You could try to run your own swank server taken from Slime manually, then let Slimv connect it. This can help if the swank server bundled with Slimv is not fully Lion-compatible.
  • You may want to try the most recent version taken from the Slimv repository.
Tamas Kovacs
  • 1,495
  • 7
  • 9
  • Tamas you are the kibo of SO. I enabled logging in swank.py, but I can't find the log file. Where is swank.log written to by default? I tried the most recent version from the repo, but got the same result – Patrick Sep 23 '11 at 19:04
  • Well, on Windows or Linux it is written in the "current" directory, i.e. the one Vim was started from. But you can also change the logfile name in swank.py by specifying a full path: `logfile = '\mypath\swank.log'`. Then you'll know where to find it. It is also possible that the logfile was simply not created because Vim crashed before writing any log message. In this case you should switch verbose mode on (e.g. set verbosefile=\path\slimv.log | set verbose=20) before trying to open the repl buffer. – Tamas Kovacs Sep 23 '11 at 19:59
  • seems like it wasn't creating the file before it crashed. here ya go - http://patrickkettner.com/slimv_crash.txt Thanks so much – Patrick Sep 23 '11 at 20:14
  • Seems like you also have fugitive.vim installed and Vim crashed while executing the BufWinLeave autocommand for fugitive. Slimv does some heavy buffer/window switching and this may be interfering with those autocommands, so I suggest to perform a test with fugitive disabled. There's also a new slimv090 branch in the repository that does less buffer switching, you may want to try that one as well. – Tamas Kovacs Sep 23 '11 at 20:36
  • It seems you tried to eval form (+ 2 2) twice, and the second one came before the first one finished. There may be a bug here that needs to be hunted down, but first please do this: try to open the repl buffer via ,c (connect server) in verbose mode and don't use ,d (eval defun) yet. Please contact me in email (you can find it in the doc), it seems that this problem needs a little more conversation.[I've deleted my previous comment, because it was a total mistake, sorry about that.] – Tamas Kovacs Sep 24 '11 at 10:54
  • I'm having a similar problem, except that Vim segfaults as soon as I try to connect. // I'm using Slimv from the Mercurial repo, changeset 841be852040b // Here's a screencast showing the problem: http://www.screenr.com/r3Rs // Here are the swank log and verbosefile log: https://gist.github.com/1256851 – Steve Losh Oct 02 '11 at 00:19
  • Another user reported macvim 7.3-59 segfaulting, but everything worked fine using version 7.3-57. Something must have changed in Vim from 7.3-57 to 7.3-59 in regard to python. If possible please check if the older Vim version works for you as well. – Tamas Kovacs Oct 02 '11 at 06:40
  • Hm, you're right, snapshot 61 works while 62 (the latest) segfaults. – Steve Losh Oct 02 '11 at 23:11
  • Sorry Tamas, for some reason I missed your last post to me, I emailed you if you would still like to talk about it, otherwsie thanks for all the help =] – Patrick Nov 10 '11 at 07:13