[zip-devel] SBCL: "BUFFER-OUTPUT-STREAM...has no suitable method for STREAM-WRITE-BYTE"
Kevin Reid
kpreid at mac.com
Tue Apr 11 20:24:13 UTC 2006
There are two problems here, and I didn't write down exactly what
happened, so this explanation may be a little scrambled.
A while after updating SBCL to 0.9.11.24, I attempted to use a
program using the zip ASDF system, and got "The value NIL is not of
type REAL.", which usually indicates a missing component file.
Hoping for a simple fix, I did 'cvs update' in the zip directory. The
resulting system had the same problem; apparently, the use of
the :pathname option in zip.asd is, *if* the system has already been
compiled, causing ASDF to attempt to use pathnames such as ".../zip/
gray", with no :type, which do not exist. After adding the types in
the ASD, the system compiles and loads normally.
(This is with ASDF 1.93.)
However, ZIPFILE-ENTRY-CONTENTS failed. I tried the CLiki asdf-
install package instead of CVS, and it gave the same error:
(edited slightly)
$ rlwrap sbcl
This is SBCL 0.9.11.24, an implementation of ANSI Common Lisp. ...
* (use-package :asdf)
T
* (operate 'load-op :zip)
...
NIL
* (use-package :zip)
T
* (defparameter *f* (open-zipfile #p"/Stuff/e/e.jar"))
*F*
* (defparameter *e* (get-zipfile-entry "META-INF/MANIFEST.MF" *f*))
*E*
* *e*
#S(ZIP::ZIPFILE-ENTRY
:NAME "META-INF/MANIFEST.MF"
:STREAM #<SB-SYS:FD-STREAM for "file /Stuff/e/e.jar" {12392A51}>
:OFFSET 61
:SIZE 120
:COMPRESSED-SIZE 112)
* (defparameter *c* (zipfile-entry-contents *e*))
debugger invoked on a SIMPLE-ERROR:
The stream #<ZIP::BUFFER-OUTPUT-STREAM {11A2D159}> has no suitable
method for
STREAM-WRITE-BYTE, and so has fallen through to this method. If
you think
that this is a bug, please report it to the applicable authority
(bugs in
SBCL itself should go to the mailing lists referenced from
<http://www.sbcl.org/>).
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit debugger, returning to top level.
((SB-PCL::FAST-METHOD STREAM-WRITE-BYTE (STREAM T))
#<unavailable argument>
#<unavailable argument>
#<ZIP::BUFFER-OUTPUT-STREAM {11A2D159}>
#<unavailable argument>)
0] ba
0: ((SB-PCL::FAST-METHOD STREAM-WRITE-BYTE (STREAM T))
#<unavailable argument>
#<unavailable argument>
#<ZIP::BUFFER-OUTPUT-STREAM {11A2D159}>
#<unavailable argument>)
1: ((SB-PCL::FAST-METHOD STREAM-WRITE-BYTE (STREAM "#<...>" . "#<...>"))
#<unavailable argument>
#<unavailable argument>
#<ZIP::BUFFER-OUTPUT-STREAM {11A2D159}>
#<unavailable argument>)
2: (SB-GRAY::BASIC-IO-TYPE-STREAM-WRITE-SEQUENCE
#<ZIP::BUFFER-OUTPUT-STREAM {11A2D159}>
#(77 97 110 105 102 101 115 116 45 86 101 114 ...)
0
120
#<STANDARD-GENERIC-FUNCTION STREAM-WRITE-BYTE (4)>)
3: (WRITE-SEQUENCE
#(77 97 110 105 102 101 115 116 45 86 101 114 ...)
#<ZIP::BUFFER-OUTPUT-STREAM {11A2D159}>)
4: (ZIP::PROCESS-DEFLATE-BLOCK
#S(ZIP::BIT-READER
:STREAM #<ZIP::TRUNCATING-STREAM {119D0F21}>
:LAST-BYTE 0
:BITS 1)
#<ZIP::BUFFER-OUTPUT-STREAM {11A2D159}>
#(77 97 110 105 102 101 115 116 45 86 101 114 ...)
#<unavailable argument>)
5: (INFLATE
#<ZIP::TRUNCATING-STREAM {119D0F21}>
#<ZIP::BUFFER-OUTPUT-STREAM {11A2D159}>)
6: ((SB-PCL::FAST-METHOD ZIPFILE-ENTRY-CONTENTS (ZIP::ZIPFILE-ENTRY))
#<unavailable argument>
#<unavailable argument>
#S(ZIP::ZIPFILE-ENTRY
:NAME "META-INF/MANIFEST.MF"
:STREAM #<SB-SYS:FD-STREAM for "file /Stuff/e/e.jar" {12392A51}>
:OFFSET 61
:SIZE 120
:COMPRESSED-SIZE 112)
NIL)
7: (SB-INT:EVAL-IN-LEXENV (ZIPFILE-ENTRY-CONTENTS *E*) #<NULL-LEXENV>)
8: (SB-INT:EVAL-IN-LEXENV
(SB-IMPL::%DEFPARAMETER '*C*
(ZIPFILE-ENTRY-CONTENTS *E*)
NIL
'NIL
(SB-C:SOURCE-LOCATION))
#<NULL-LEXENV>)
9: (SB-INT:EVAL-IN-LEXENV
(EVAL-WHEN (:LOAD-TOPLEVEL :EXECUTE)
(SB-IMPL::%DEFPARAMETER '*C*
(ZIPFILE-ENTRY-CONTENTS *E*)
NIL
'NIL
(SB-C:SOURCE-LOCATION)))
#<NULL-LEXENV>)
10: (SB-INT:EVAL-IN-LEXENV
(DEFPARAMETER *C* (ZIPFILE-ENTRY-CONTENTS *E*))
#<NULL-LEXENV>)
11: (INTERACTIVE-EVAL (DEFPARAMETER *C* (ZIPFILE-ENTRY-CONTENTS *E*)))
12: (SB-IMPL::REPL-FUN NIL)
13: ((LAMBDA ()))
14: ((LAMBDA ()))
15: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<CLOSURE (LAMBDA #) {12348FB5}>)
16: (SB-IMPL::TOPLEVEL-REPL NIL)
17: (SB-IMPL::TOPLEVEL-INIT)
18: ((LABELS SB-IMPL::RESTART-LISP))
0]
--
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the zip-devel
mailing list