This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: problem with telnet server
kawa does the same thing with one line:
(define (f n) (f))
neither of these examples should run in any scheme, because they make
calls that have the wrong number of arguments. however in some other
interpreted schemes (SCM, Bigloo, MzScheme) they croak when evaluated,
not when defined.
it seems like when kawa tries to compile these expressions, the bytecode
emitter throws a NullPointerException and no one catches the exception
and the JVM shuts down...
oddly, it doesn't happen with mutually recursive functions:
(define (f n) n)
(define (g) (f))
these eval just fine and when g is applied, a runtime exception
is thrown and you find yourself back at the REPL.
this probably shouldn't kill kawa. but for now it does.
luckily, there is a simple workaround -- match the number of arguments
in a definition and a call.
good luck,
jason
Pinte_Stanislas@emc.com wrote:
hello,
using the kawa telnet client, I think there is a bug somewhere...
when you evaluate the following expressions in a telnet window, the kawa
process crashes the JVM
(define (append-tab string)
(string-append string "\t"))
(define (get-line start values line end)
(if (empty? values)
(string-append (append-tab (string-append start line)) end)
(get-line (cdr values)
(string-append (append-tab line) (car values)))))
any idea why?
thanks a lot,
Stan.
Stanislas Pinte - Associate Software Engineer.
Phone: +32-(0)15-401.371
Fax: +32-(0)15-401.400
Address: Schaliënhoevedreef 20i, B-2800 Mechelen, Belgium