[slime-devel] printing large amounts of text at once breaks with SBCL/:fd-handler
Bart Botta
00003b at gmail.com
Sun Sep 21 22:29:51 UTC 2008
Current CVS slime breaks when a large amount of text is printed to the
REPL when using :fd-handler communication style on SBCL (tested on
1.0.19 and 1.0.20).
For example:
(loop for i below 1000 do (format t "~a
......................................................................~%"
i))
stops partway through the loop, pressing enter makes it print a bit
more, entering a form causes it to evaluate that form and print a bit
more of the original output.
backtrace from entering (break) while REPL was stopped in middle of output:
Restarts:
0: [CONTINUE] Return from BREAK.
1: [RETRY] Retry SLIME REPL evaluation request.
2: [ABORT] Abort sending output to Emacs.
3: [RETRY] Retry SLIME REPL evaluation request.
4: [ABORT] Return to SLIME's top level.
5: [ABORT] Exit debugger, returning to top level.
Backtrace:
0: (BREAK "break")
1: (SB-INT:SIMPLE-EVAL-IN-LEXENV (BREAK) #<NULL-LEXENV>)
2: (SWANK::EVAL-REGION "(break)\n")
3: ((LAMBDA ()))
4: (SWANK::TRACK-PACKAGE #<CLOSURE (LAMBDA #) {B1BED2D}>)
5: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation
request." #<CLOSURE (LAMBDA #) {B1BEC15..
6: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA #) {B1BEBFD}>)
7: (SWANK::REPL-EVAL "(break)\n")
8: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:LISTENER-EVAL "(break)\n")
#<NULL-LEXENV>)
9: (SWANK::EVAL-FOR-EMACS (SWANK:LISTENER-EVAL "(break)\n")
"COMMON-LISP-USER" 74)
10: (SWANK::PROCESS-REQUESTS T NIL)
11: (SB-IMPL::SUB-SUB-SERVE-EVENT NIL NIL)
12: (SB-IMPL::SUB-SERVE-EVENT NIL NIL NIL)
13: (SB-SYS:WAIT-UNTIL-FD-USABLE 6 :INPUT NIL)
14: (SB-IMPL::REFILL-INPUT-BUFFER #<SB-SYS:FD-STREAM for "a socket" {AC5A119}>)
15: (SB-IMPL::INPUT-CHAR/UTF-8 #<SB-SYS:FD-STREAM for "a socket"
{AC5A119}> NIL :EOF)
16: (PEEK-CHAR NIL #<SB-SYS:FD-STREAM for "a socket" {AC5A119}> NIL
NIL #<unused argument>)
17: ((LAMBDA (SWANK-BACKEND::STREAMS &OPTIONAL
SWANK-BACKEND::TIMEOUT)) (#<SB-SYS:FD-STREAM for "a socke..
18: (SWANK::WAIT-FOR-EVENT/EVENT-LOOP (:EMACS-PONG 13) NIL)
19: (SWANK::WAIT-FOR-EVENT (:EMACS-PONG 13) NIL)
20: (SWANK::SEND-USER-OUTPUT ..)
21: ((LAMBDA ()))
22: ((LAMBDA ()))
23: ((FLET #:WITHOUT-INTERRUPTS-BODY-[CALL-WITH-RECURSIVE-LOCK]508))
24: (SB-THREAD::CALL-WITH-RECURSIVE-LOCK ..)
25: ((LAMBDA (SWANK-BACKEND::LOCK FUNCTION)) #S(SB-THREAD:MUTEX :NAME
"buffer write lock" :%OWNER #<SB-T..
26: ((SB-PCL::FAST-METHOD STREAM-FINISH-OUTPUT
(SWANK-BACKEND::SLIME-OUTPUT-STREAM)) #(3 NIL 2 NIL 5 NIL..
27: ((LAMBDA ()))
28: ((FLET #:WITHOUT-INTERRUPTS-BODY-[CALL-WITH-RECURSIVE-LOCK]508))
29: (SB-THREAD::CALL-WITH-RECURSIVE-LOCK ..)
30: ((LAMBDA (SWANK-BACKEND::LOCK FUNCTION)) #S(SB-THREAD:MUTEX :NAME
"buffer write lock" :%OWNER #<SB-T..
31: ((SB-PCL::FAST-METHOD STREAM-WRITE-STRING
(SWANK-BACKEND::SLIME-OUTPUT-STREAM T)) ..)
32: (WRITE-STRING "
......................................................................"
#<SWANK-BACK..
33: (SB-FORMAT::INTERPRET-DIRECTIVE-LIST
#<SWANK-BACKEND::SLIME-OUTPUT-STREAM {A6EC099}> (" ..............
34: (SB-FORMAT::%FORMAT #<SWANK-BACKEND::SLIME-OUTPUT-STREAM
{A6EC099}> "~a ..............................
35: (FORMAT T "~a
......................................................................~%")[:EXTERNAL]
36: ((LAMBDA ()))
37: (SB-INT:SIMPLE-EVAL-IN-LEXENV (LOOP FOR I BELOW 1000 DO ...)
#<NULL-LEXENV>)
38: (SWANK::EVAL-REGION "(loop for i below 1000 do (format t \"~a
........................................
39: ((LAMBDA ()))
40: (SWANK::TRACK-PACKAGE #<CLOSURE (LAMBDA #) {AFDEC95}>)
41: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation
request." #<CLOSURE (LAMBDA #) {AFDEB7D..
42: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA #) {AFDEB65}>)
43: (SWANK::REPL-EVAL "(loop for i below 1000 do (format t \"~a
..........................................
44: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:LISTENER-EVAL "(loop for i
below 1000 do (format t \"~a .........
45: (SWANK::EVAL-FOR-EMACS (SWANK:LISTENER-EVAL "(loop for i below
1000 do (format t \"~a ................
46: (SWANK::PROCESS-REQUESTS T NIL)
47: ((LAMBDA ()))
48: ((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN)) #<FUNCTION
SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (..
49: (SWANK::CALL-WITH-REDIRECTED-IO #<SWANK::CONNECTION {AC5AD59}>
#<CLOSURE (LAMBDA #) {AFCBF35}>)
50: (SWANK::CALL-WITH-CONNECTION #<SWANK::CONNECTION {AC5AD59}>
#<CLOSURE (LAMBDA #) {AFCBF25}>)
51: (SWANK::HANDLE-REQUESTS #<SWANK::CONNECTION {AC5AD59}> T NIL)
52: (SB-IMPL::SUB-SUB-SERVE-EVENT NIL NIL)
53: (SB-IMPL::SUB-SERVE-EVENT NIL NIL NIL)
54: (SB-SYS:WAIT-UNTIL-FD-USABLE 0 :INPUT NIL)
55: (SB-IMPL::REFILL-INPUT-BUFFER #<SB-SYS:FD-STREAM for "standard
input" {A6E57F1}>)
56: (SB-IMPL::INPUT-CHAR/UTF-8 #<SB-SYS:FD-STREAM for "standard
input" {A6E57F1}> NIL #:EOF-OBJECT)
57: (READ-CHAR #<SB-SYS:FD-STREAM for "standard input" {A6E57F1}> NIL
#:EOF-OBJECT #<unused argument>)
58: (READ-CHAR #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {90DA579}> NIL
#:EOF-OBJECT #<unused argument>)
59: (READ-PRESERVING-WHITESPACE #<SYNONYM-STREAM :SYMBOL
SB-SYS:*STDIN* {90DA579}> NIL (NIL) T)
60: (READ-PRESERVING-WHITESPACE #<SYNONYM-STREAM :SYMBOL
SB-SYS:*STDIN* {90DA579}> NIL (NIL) NIL)
61: (READ #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {90DA579}> NIL (NIL) NIL)
62: (SB-IMPL::REPL-READ-FORM-FUN #<SYNONYM-STREAM :SYMBOL
SB-SYS:*STDIN* {90DA579}> #<unavailable argume..
63: (SB-IMPL::REPL-FUN NIL)
64: (SB-IMPL::REPL-FUN NIL)[:EXTERNAL]
65: ((LAMBDA ()))
66: ((LAMBDA ()))[:EXTERNAL]
67: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<CLOSURE (LAMBDA #) {A6E8AD5}>)
68: (SB-IMPL::TOPLEVEL-REPL NIL)
69: (SB-IMPL::TOPLEVEL-INIT)
70: ((LABELS SB-IMPL::RESTART-LISP))
More information about the slime-devel
mailing list