I use CLisp with Slime on Windows NT. If I work in Slime and save an image, the reload of the saved image cause a stack overflow problem. The exact message is : *** - Program stack overflow. RESET
My guess is that the problem is caused by the reloading of Slime that interacts with the Slime that is already in the saved image. The saved image can be loaded without a problem if Slime is not used. What is the workaround ? I have tried to disable the loading of Slime since the Lisp part of Slime should be part of the saved image, but had no success. Any suggestions would be appreciated.
Nico Swart.
Nico schrieb:
I use CLisp with Slime on Windows NT. If I work in Slime and save an image, the reload of the saved image cause a stack overflow problem. The exact message is : *** - Program stack overflow. RESET
My guess is that the problem is caused by the reloading of Slime that interacts with the Slime that is already in the saved image. The saved image can be loaded without a problem if Slime is not used. What is the workaround ? I have tried to disable the loading of Slime since the Lisp part of Slime should be part of the saved image, but had no success. Any suggestions would be appreciated.
That's probably a clisp problem. You should report that with your exact clisp version used to the clisp list. For this clisp of mine it works fine:
$ clisp --version GNU CLISP 2.33 (2004-03-17) (built 3304715083) (memory 3304774021) Software: GNU-C 3.3.3 (cygwin special) gcc -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wno-sign-compare -O2 -fexpensiv e-optimizations -DUNICODE -DDYNAMIC_FFI -I. -x none -lintl libcharset.a libavcall.a libcallback.a -l readline -lncurses -liconv -L/usr/local/lib -lsigsegv -L/usr/X11R6/lib -lX11 SAFETY=0 HEAPCODES STANDARD_HEAPCODES SPVW_PAGES SPVW_MIXED Features: (ASDF LOOP COMPILER CLOS CLISP ANSI-CL COMMON-LISP LISP=CL INTERPRETER SOCKETS GENERIC-STREAMS LOGICAL-PATHNAMES SCREEN FFI GETTEXT UNICODE BASE-CHAR=CHARACTER PC386 UNIX CYGWIN) Installation directory: /usr/lib/clisp/ User language: ENGLISH Machine: I686 (I686) reini.helsinki.local [192.168.0.2]
[This message was apparently lost, because HD was full.]
Nico nswart@zoominternet.net writes:
I use CLisp with Slime on Windows NT. If I work in Slime and save an image, the reload of the saved image cause a stack overflow problem. The exact message is : *** - Program stack overflow. RESET
The problem is that we keep some network streams in global variables and they become invalid after reloading. There is also some synonym stream magic, but I don't understand that.
My guess is that the problem is caused by the reloading of Slime that interacts with the Slime that is already in the saved image. The saved image can be loaded without a problem if Slime is not used. What is the workaround ? I have tried to disable the loading of Slime since the Lisp part of Slime should be part of the saved image, but had no success. Any suggestions would be appreciated.
On possible solution is as follows: To save the image
1) M-x slime-disconnect 2) switch to the *inferior-lisp* buffer the remove the network streams like so:
[4]> (swank::revert-global-io-redirection) nil [5]> (ext:saveinitmem "/tmp/swank.mem")
To load the image:
1) Don't use M-x slime directly to avoid loading SWANK twice. Instead use something like:
M-x run-lisp RET clisp -M /tmp/swank.mem
2) Start the swank server manually in the *inferior-lisp* buffer
[1]> (swank:create-server) ;; Swank started at port: 4005.
3) Connect manually to the server:
M-x slime-connect
We should probably improve our shutdown logic a bit and make it easier start a Lisp with a preloaded SWANK.
Helmut.
Helmut Eller wrote:
[This message was apparently lost, because HD was full.]
Nico nswart@zoominternet.net writes:
I use CLisp with Slime on Windows NT. If I work in Slime and save an image, the reload of the saved image cause a stack overflow problem. The exact message is : *** - Program stack overflow. RESET
The problem is that we keep some network streams in global variables and they become invalid after reloading. There is also some synonym stream magic, but I don't understand that.
My guess is that the problem is caused by the reloading of Slime that interacts with the Slime that is already in the saved image. The saved image can be loaded without a problem if Slime is not used. What is the workaround ? I have tried to disable the loading of Slime since the Lisp part of Slime should be part of the saved image, but had no success. Any suggestions would be appreciated.
On possible solution is as follows: To save the image
M-x slime-disconnect
switch to the *inferior-lisp* buffer the remove the network streams like so:
[4]> (swank::revert-global-io-redirection) nil [5]> (ext:saveinitmem "/tmp/swank.mem")
To load the image:
Don't use M-x slime directly to avoid loading SWANK twice. Instead use something like:
M-x run-lisp RET clisp -M /tmp/swank.mem
Start the swank server manually in the *inferior-lisp* buffer
[1]> (swank:create-server) ;; Swank started at port: 4005.
Connect manually to the server:
M-x slime-connect
We should probably improve our shutdown logic a bit and make it easier start a Lisp with a preloaded SWANK.
Helmut.
Thanks for the advice, it does what I need. It would be nice if it can be a little easier to work with a preloaded SWANK. Is this issue common to most Lisp implementations ?
Nico.