Helmut Eller e9626484@stud3.tuwien.ac.at writes:
Chisheng Huang cph@chi-square-works.com writes:
Slime retrieved by cvs update -D "2004-11-12" does not have this problem. Slime retrieved by cvs update -D "2004-11-16" does. Would somebody please look into this? Thanks a lot.
The warning only means that you missed a few garbage collection messages. With CMUCL, GC messages are now displayed in the echo area but apparently GC was triggered at a moment when the connection to Emacs wasn't quite ready. I think this is not crucial and I'll fix it later.
The Simple-Warning conditions signaled under such circumstances are actually caught by a catch-all CONDITION clause in a HANDLER-CASE in my program and causes troubles for me. Typing simple code like the following
(handler-case (dotimes (i 100000) (random 20000000)) (condition () (print :stop)))
in a slime repl buffer won't reproduce the problem. The actual code that caught those simple warning conditions is too complicated to reproduce here.
Anyway, I just use the following SEND-TO-EMACS to get around the problem:
(defun send-to-emacs (object) "Send OBJECT to Emacs." (when *emacs-connection* (funcall (connection.send *emacs-connection*) object)))
If you think this fix is O.K., would you please merge it into swank.lisp?
Of course, it's entirely logical to ask why *EMACS-CONNECTION* is NIL in the first place, which is totally beyond me.
Best wishes,
-cph
Chisheng Huang cph@chi-square-works.com writes:
(defun send-to-emacs (object) "Send OBJECT to Emacs." (when *emacs-connection* (funcall (connection.send *emacs-connection*) object)))
If you think this fix is O.K., would you please merge it into swank.lisp?
That's not the best place for the test because *emacs-connection* _should_ never be nil here. Adding the test here makes finding bugs harder, as it would be a kind of fail silent behavior.
I added the test in the gc-hooks instead. There's also new variable *install-gc-hooks* to disable the gc hooks for SLIME entirely.
Of course, it's entirely logical to ask why *EMACS-CONNECTION* is NIL in the first place, which is totally beyond me.
Yes, that's a good question. It can be nil if a you disconnect and a GC happens afterwards or if you do some asynchronous processing, e.g., in a fd-handler or a thread. It should never be nil if the GC is (indirectly) triggered by a SLIME request.
Helmut.