Hi Heath,
> I'm trying to make a TFTP server with scsh. I'm using OpenBSD and
> 0.6.6 (King Conan). I have not patched in Mike's stuff for process
> forms.
>
> To my horror, I'm getting a low-level error that appears random to
> me. Exactly when (and how) seems non-deterministic.
[...]
> You'll see a column of numbers streaming by in the scheme window (as
> it prints out the block number) until it gives an error:
>
> 1
> 2
> 3
> ...
> 12136
>
> Error: exception
> wrong-type-argument
> (return-from-callback "send_substring" '#{Random object})
> 1>
>
I have not tried your script, but I want to mention the scsh debugger that
might help you. Did you try it? It will tell your, where the error
occurred and what the current values where, when it occurred.
When you see the prompt '1>', type ',debug'. You can then step trough the
stack with (u)p and (d)own, and inspect values by entering the number. Say
'?' for help.
Here's a short example:
;; function
> (define (bug a)
(map display a))
> (bug 13)
Error: null-list?: argument out of domain
13
1> ,debug ;; this starts the debugger
'#{Exception-continuation (pc 51) (null-list? in srfi-1)}
[0: l] 13 ;; this is the list of current values,
;; here, there's only the var named 'l'.
inspect: d ;; this goes down and displays the previous cont.
'#{Continuation (pc 17) (recur in map-in-order in srfi-1)}
Waiting for (null-list? lis) ;; this tells you where the error occ.
in (if ^^^ lis ((lambda # #) (cdr lis) (f #)))
[0: lis] 13
[1: recur] '#{Procedure 8284 (recur in map-in-order in srfi-1)}
[2: f] '#{Procedure 12676 (display in scsh-level-0)}
[3: lis1] 13
[4: lists] '()
inspect:
Maybe this helps you locate the source of your error. If you post a
backtrace (pressing 'd' several times in the debugger) somebody might be
able to assist you.
Andreas.
--
Andreas Bernauer
Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS
GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail
|