Rarely, we've seen this type error in DO-OUTPUT-LATER:

        Type-error in KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER:
           NIL is not of type (MOD 536870911)

It's referring to the type INDEX:

        (defun do-output-later (stream)
          (let* ((stuff (pop (fd-stream-output-later stream)))
                 (base (car stuff))
                 (start (cadr stuff))
                 (end (caddr stuff))
                 (reuse-sap (cadddr stuff))
                 (length (- end start)))
            (declare (type index start end length))
            ...

so one of START, END, OR LENGTH must be null when DO-OUTPUT-LATER is
called.  Unfortunately, I only have the error message and a
backtrace[1] to work with.  

We're using "release x86-linux 3.0.8 18c+ 31 December 2001 build 3030",
but DO-OUTPUT-LATER has been modified.  It comes from the IMHO
package[2].  I've included the full source below[3].

I still have some more code reading to do.  I need to figure out why 
WAIT-UNTIL-FD-USABLE is called on file descriptor 0 (is that the Unix 
file descriptor?) and then UNIX:UNIX-FAST-SELECT is called, and
finally, DO-OUTPUT-LATER is called on #<Stream for descriptor 24> (is 
that the Unix file descriptor 24?).

I haven't seen this mentioned in the cmucl-help archives, so I thought
I'd ask here.

Thanks for taking the time to read this.


Craig Ludington




References:

[1] The backtrace:

        0: (COMMON-LISP::DO-OUTPUT-LATER #<Stream for descriptor 24>)
        1: (COMMON-LISP::SUB-SERVE-EVENT 1 0)
        2: (SYSTEM:WAIT-UNTIL-FD-USABLE 0 :INPUT NIL)
        3: (COMMON-LISP::DO-INPUT #<Stream for Standard Input>)
        4: (COMMON-LISP::INPUT-CHARACTER #<Stream for Standard Input>
                                         NIL
                                         (COMMON-LISP::*EOF*))
        5: (COMMON-LISP::SYNONYM-IN #<Synonym Stream to SYSTEM:*STDIN*>
                                    NIL
                                    (COMMON-LISP::*EOF*))
        6: (COMMON-LISP::TWO-WAY-IN
            #<Two-Way Stream, Input = #<Synonym Stream to SYSTEM:*STDIN*>, Output =
        #<Synonym Stream to SYSTEM:*STDOUT*>>
            NIL
            (COMMON-LISP::*EOF*))
        7: (READ-CHAR
            #<Two-Way Stream, Input = #<Synonym Stream to SYSTEM:*STDIN*>, Output =
        #<Synonym Stream to SYSTEM:*STDOUT*>>
            NIL
            (COMMON-LISP::*EOF*)
            #<unused-arg>)
        8: (READ-PRESERVING-WHITESPACE
            #<Two-Way Stream, Input = #<Synonym Stream to SYSTEM:*STDIN*>, Output =
        #<Synonym Stream to SYSTEM:*STDOUT*>>
            NIL
            (:EOF)
            T)
        9: (READ-PRESERVING-WHITESPACE
            #<Two-Way Stream, Input = #<Synonym Stream to SYSTEM:*STDIN*>, Output =
        #<Synonym Stream to SYSTEM:*STDOUT*>>
            NIL
            (:EOF)
            NIL)
        10: (READ-PRESERVING-WHITESPACE 4
                                        #<Two-Way Stream, Input = #<Synonym Stream to
        SYSTEM:*STDIN*>, Output = #<Synonym Stream to SYSTEM:*STDOUT*>>
                                        NIL
                                        (:EOF)
                                        ...)[:EXTERNAL]
        11: (READ
             #<Two-Way Stream, Input = #<Synonym Stream to SYSTEM:*STDIN*>, Output =
        #<Synonym Stream to SYSTEM:*STDOUT*>>
             NIL
             (:EOF)
             NIL)
        12: (COMMON-LISP::%TOP-LEVEL)
        13: (COMMON-LISP::RESTART-LISP)

[2] The IMHO home page is <URL:http://alpha.onshored.com/lisp-software/>.

[3]

Reply via email to