On 3/4/11 3:00 AM, Helmut Eller wrote:
- Raymond Toy [2011-03-03 20:26] writes:
On 3/3/11 7:47 AM, Desmond O. Chang wrote:
Hi,
If slime-net-coding-system is utf-8-unix, emacs will enter backtrace buffer after cmucl startup. Here is my operation:
- (setq slime-net-coding-system 'utf-8-unix)
- C-u M-x slime
- input "lisp -noinit"
- cmucl starting...
- cmucl started, but raises emacs debugger
This error doesn't occur every time. If everything is ok, please quit cmucl then restart it, the error should occur now.
FWIW, I can reproduce this. I don't have such problems with cmucl and xemacs, though. I don't what the cause is, but a backtrace would be useful.
The problem seems to be that (format stream "~6,'0x" length) triggers a gc-hook which writes something to the stream in the middle of the length field. I was able to reproduce it with the March snapshot but not with the one from December.
Quick workaround: add (setq swank-backend::*install-gc-hooks* nil) to ~/.swank.lisp.
We could write the length to a private buffer before writing it to the stream. That would probably work most of the time. I guess, tho, that any kind of writing to a stream can potentially trigger gc.
How about disabling gc in write-message? Or at least on cmucl, binding ext:*gc-verbose* to NIL in write-message?
That seems to work for me.
Ray