I'm connecting with latest SLIME CVS (as of tonight) to SBCL 1.0.17 (Fedora 8). I'm trying to use Drakma to snarf the home page of LispForum with (drakma:http-request "http://www.lispforum.com/")
Oddly, when I do so, I get: "Lisp connection closed unexpectedly: connection broken by remote peer"
This doesn't happen when I try other web pages, however. With others, I get the text of the web page back as a string. Oddly, it does *not* happen when connecting to the same page when running SBCL in a term window as opposed to SLIME.
Any suggestions for where to start looking? My gut says that there is a particular character or something like that in the page that SWANK can't return over the channel to SLIME/Emacs. I'm not sure how to debug it, though, since SWANK kills the connection with extreme prejudice. Does SWANK create any sort of log file anywhere, or can I enable it to do so?
Thanks,
-- Dave
Dave Roberts ldave@droberts.com writes:
Any suggestions for where to start looking? My gut says that there is a particular character or something like that in the page that SWANK can't return over the channel to SLIME/Emacs. I'm not sure how to debug it, though, since SWANK kills the connection with extreme prejudice. Does SWANK create any sort of log file anywhere, or can I enable it to do so?
Thanks,
Set SWANK:*LOG-EVENTS* to T for information from the swank side, and look into the buffer *slime-events* for information from the slime side.
-T.
On Tue, 2008-08-05 at 08:57 +0200, Tobias C. Rittweiler wrote:
Dave Roberts ldave@droberts.com writes:
Any suggestions for where to start looking? My gut says that there is a particular character or something like that in the page that SWANK can't return over the channel to SLIME/Emacs. I'm not sure how to debug it, though, since SWANK kills the connection with extreme prejudice. Does SWANK create any sort of log file anywhere, or can I enable it to do so?
Thanks,
Set SWANK:*LOG-EVENTS* to T for information from the swank side, and look into the buffer *slime-events* for information from the slime side.
-T.
Thanks. There was nothing in *slime-events* at all. The command is there, but no output or diagnostics. Where does SWANK log things when *log-events* is set to T? It looks like swank:*log-output* is set to standard error, but I'm not sure what that points to when the SBCL instance is started using M-x slime in Emacs.
-- Dave
Dave Roberts ldave@droberts.com writes:
Thanks. There was nothing in *slime-events* at all. The command is there, but no output or diagnostics. Where does SWANK log things when *log-events* is set to T? It looks like swank:*log-output* is set to standard error, but I'm not sure what that points to when the SBCL instance is started using M-x slime in Emacs.
It's in *inferior-lisp*.
-T.
On Tue, 2008-08-05 at 09:19 +0200, Tobias C. Rittweiler wrote:
Dave Roberts ldave@droberts.com writes:
Thanks. There was nothing in *slime-events* at all. The command is there, but no output or diagnostics. Where does SWANK log things when *log-events* is set to T? It looks like swank:*log-output* is set to standard error, but I'm not sure what that points to when the SBCL instance is started using M-x slime in Emacs.
It's in *inferior-lisp*.
Ah, gotcha. Thanks. It looks like SBCL threw a SB-INT:STREAM-ENCODING-ERROR. The last bit of the output in *inferior-lisp* is:
...[lots of HTML output snipped]... </body> </html>" " :repl-result) ;; Event history end. ;; Backtrace: ;; Connection to Emacs lost. [ ;; condition: Unable to display error condition: #<SB-SYS:FD-STREAM for "a socket" {B28D9A9}> is closed. ;; type: SB-INT:STREAM-ENCODING-ERROR ;; encoding: NIL style: :SPAWN dedicated: NIL]
Any idea how I should interpret that?
-- Dave
Dave Roberts ldave@droberts.com writes:
On Tue, 2008-08-05 at 09:19 +0200, Tobias C. Rittweiler wrote:
Dave Roberts ldave@droberts.com writes:
Thanks. There was nothing in *slime-events* at all. The command is there, but no output or diagnostics. Where does SWANK log things when *log-events* is set to T? It looks like swank:*log-output* is set to standard error, but I'm not sure what that points to when the SBCL instance is started using M-x slime in Emacs.
It's in *inferior-lisp*.
Ah, gotcha. Thanks. It looks like SBCL threw a SB-INT:STREAM-ENCODING-ERROR. The last bit of the output in *inferior-lisp* is:
...[lots of HTML output snipped]...
</body> </html>\" " :repl-result) ;; Event history end. ;; Backtrace: ;; Connection to Emacs lost. [ ;; condition: Unable to display error condition: #<SB-SYS:FD-STREAM for "a socket" {B28D9A9}> is closed. ;; type: SB-INT:STREAM-ENCODING-ERROR ;; encoding: NIL style: :SPAWN dedicated: NIL]
Any idea how I should interpret that?
Perhaps you have to enable unicode:
Add ':coding-system utf-8-unix' to the sbcl entry in your `slime-lisp-implementations', and set `slime-net-coding-system' to `utf-8-unix'.
-T.
On Tue, 2008-08-05 at 09:48 +0200, Tobias C. Rittweiler wrote:
Perhaps you have to enable unicode:
Add ':coding-system utf-8-unix' to the sbcl entry in your `slime-lisp-implementations', and set `slime-net-coding-system' to `utf-8-unix'.
Okay, I'll try that. Thanks!
-- Dave
* Dave Roberts [2008-08-05 08:51+0200] writes:
Any suggestions for where to start looking? My gut says that there is a particular character or something like that in the page that SWANK can't return over the channel to SLIME/Emacs. I'm not sure how to debug it, though, since SWANK kills the connection with extreme prejudice. Does SWANK create any sort of log file anywhere, or can I enable it to do so?
Yes, sounds like a character encoding problem. Maybe using utf-8 would solve it.
There should be some error messages in the *inferior-lisp* buffer. This includes the condition, (sometimes) the backtrace, and the last few exchanged messages. Non-ascii chars are escaped with \xCODE.
If there's nothing in the *inferior-lisp* buffer, try to look at the *slime-events* buffer or set swank:*log-events* to t.
Helmut.
On Tue, 2008-08-05 at 09:12 +0200, Helmut Eller wrote:
- Dave Roberts [2008-08-05 08:51+0200] writes:
Any suggestions for where to start looking? My gut says that there is a particular character or something like that in the page that SWANK can't return over the channel to SLIME/Emacs. I'm not sure how to debug it, though, since SWANK kills the connection with extreme prejudice. Does SWANK create any sort of log file anywhere, or can I enable it to do so?
Yes, sounds like a character encoding problem. Maybe using utf-8 would solve it.
There should be some error messages in the *inferior-lisp* buffer. This includes the condition, (sometimes) the backtrace, and the last few exchanged messages. Non-ascii chars are escaped with \xCODE.
If there's nothing in the *inferior-lisp* buffer, try to look at the *slime-events* buffer or set swank:*log-events* to t.
Yup, in *inferior-lisp*, I see \x2026 characters in the string it was trying to return.
How would I use UTF-8? Is the problem on the Emacs side or the SWANK side?
(and as an aside, if SWANK can return all the logging info which ends up in *inferior-lisp*, how come it chokes when trying to return the same data as part of the standard REPL protocol?)
-- Dave