[slime-devel] slime choking on large output
e9626484 at stud3.tuwien.ac.at
Wed Feb 18 19:56:19 UTC 2004
"E. Tyurin" <evgeny at tyurin.com> writes:
> Error in function COMMON-LISP::ASSERT-ERROR: Short read: length=5910572 pos=28]
> Any suggestions??
This is a bug in CMUCL's read-sequence and has been fixed in newer
CMUCLs. I added a workaround for 18e in the latest SLIME version.
You can either update SLIME or add the code below to your
(defun read-into-simple-string (s stream start end)
(declare (type simple-string s))
(declare (type stream stream))
(declare (type index start end))
(unless (subtypep (stream-element-type stream) 'character)
:datum (read-char stream nil #\Null)
:expected-type (stream-element-type stream)
:format-control "Trying to read characters from a binary stream."))
;; Let's go as low level as it seems reasonable.
(let* ((numbytes (- end start))
(bytes-read (system:read-n-bytes stream s start numbytes t)))
(if (< bytes-read numbytes)
(+ start bytes-read)
More information about the slime-devel