Sun 10 Oct 2010 04:03:41 PM UTC, original submission:
Hi-
It is pretty common when I'm trying to use the ",bt" or ",frame" meta-commands that the meta-command aborts with an "expected a positive width" error. This means that somehow a zero width is being passed to the 'print' subfunction in pretty-print.
To try to debug it, when a zero width was received by pretty-print's print subfunction, I made it call a function "blammo" that just prints out a string ("MLG!") and then I continue the print as if the width were 1000 instead.
Here's a backtrace. Unfortunately the functions that I happen to be in are rather verbose getopt functions, so you'll have to ignore all of that. And, again, the "MLG!" strings indicate that a zero width was passed to pretty-print's print proc.
In ice-9/pretty-print.scm:
434:0 0 (blammo "expected a positive width" 0)
scheme@(guile-user) [2]> ,up
In ice-9/pretty-print.scm:
385:10 1 (print (0 0 () "en_US.UTF-8" ((())) ((help # #) ...) . MLG! (#f 1 1 #f ("guile-ncurses-shell") . #<directory (guile-user) 84d3870>)) MLG! 0)
scheme@(guile-user) [2]> ,up
In ice-9/pretty-print.scm:
391:12 2 (print (eval #<memoized (begin (if (if (#<variable …> MLG! (0 0 () "en_US.UTF-8" ((())) ((help (single-char #\h) (value #f)) (boldtext (single-char #\D) (value #f)) (rebindkeypad (single-char #\K) (value #f)) (nonewlines (single-char #\L) (value #f)) (morespace (single-char #\O) (value #f)) (restricted (single-char #\R) (value #f)) (tabsizelen (single-char #\T) (value #t)) (version (single-char #\V) (value #f)) (const (single-char #\c) (value #f)) (rebinddelete (single-char #\d) (value #f)) (nofollow (single-char #\l) (value #f)) (preserve (single-char #\p) (value #f)) (quiet (single-char #\q) (value #f)) (fill (single-char #\r) (value #t)) (tempfile (single-char #\t) (value #f)) (view (single-char #\v) (value #f)) (nohelp (single-char #\x) (value #f)) (suspend (single-char #\z) (value #f))) #f 1 1 #f ("guile-ncurses-shell") . #<directory (guile-user) 84d3870>)) MLG! 59)
scheme@(guile-user) [2]> ,up
In ice-9/r4rs.scm:
174:4 3 (with-output-to-port #<variable 8d7a450 value: #<outpu…> MLG! #<procedure 8b8ba20 at ice-9/pretty-print.scm:431:8 ()>)
scheme@(guile-user) [2]> ,up
In ice-9/pretty-print.scm:
430:6 4 (truncated-print (eval #<memoized (begin (if (if (#…> MLG! (0 0 () "en_US.UTF-8" ((())) ((help (single-char #\h) (value #f)) (boldtext (single-char #\D) (value #f)) (rebindkeypad (single-char #\K) (value #f)) (nonewlines (single-char #\L) (value #f)) (morespace (single-char #\O) (value #f)) (restricted (single-char #\R) (value #f)) (tabsizelen (single-char #\T) (value #t)) (version (single-char #\V) (value #f)) (const (single-char #\c) (value #f)) (rebinddelete (single-char #\d) (value #f)) (nofollow (single-char #\l) (value #f)) (preserve (single-char #\p) (value #f)) (quiet (single-char #\q) (value #f)) (fill (single-char #\r) (value #t)) (tempfile (single-char #\t) (value #f)) (view (single-char #\v) (value #f)) (nohelp (single-char #\x) (value #f)) (suspend (single-char #\z) (value #f))) #f 1 1 #f ("guile-ncurses-shell") . #<directory (guile-user) 84d3870>)) ...)
scheme@(guile-user) [2]> ,up
In ice-9/r4rs.scm:
174:4 5 (with-output-to-port #<variable 8d7a778 value: #<outpu…> MLG! #<procedure 8b8ba80 at ice-9/format.scm:503:31 ()>)
scheme@(guile-user) [2]> ,up
6 (call-with-output-string #<pro…>)
scheme@(guile-user) [2]> ,up
In ice-9/format.scm:
502:29 7 (tilde-dispatch)
scheme@(guile-user) [2]> ,up
In ice-9/format.scm:
832:12 8 (format:format-work "~9@a~:[~*~3_~;~3d~] ~v:@y~%" ("…" ...))
scheme@(guile-user) [2]> ,up
In ice-9/format.scm:
197:25 9 (format:out #<output: standard output /dev/pts/5> "~9@…" MLG! ("389:17" 6 6 72 (eval #<memoized (begin (if (if (#<variable 844d7e0 value: #<procedure < (#:optional . )>> (quote 0) <0>) (if (< <0> (- <1> (quote 1))) (eq? (string-ref (list-ref <2> <0>)) (quote #\+)) (quote #f)) (quote #f)) (begin (parse_line_column (string-drop (list-ref <2> <0>) (quote 1)) <8> <7>) (set! <0> (+ <0> (quote 1)))) (quote #<unspecified>)) (if (if (#<variable 844d7e0 value: #<procedure < (#:optional _ . )>> <0> <1>) (not (string=? (list-ref <2> <0>) (quote "-"))) (quote #f)) (begin (stdin_pager) (set_modified) (set! <0> (+ <0> (quote 1)))) (quote #<unspecified>)) (if (#<variable 844d7e0 value: #<procedure < (#:optional _ . _)>> <0> <1>) (open_buffer (list-ref <2> <0>) (quote #f)) (quote #<unspecified>)) (#<variable 84ac768 value: #<procedure format args>> (#<variable 83fb2f0 value: #<procedure current-error-port ()>>) (quote "2614: openfile = ~a~%") (#<variable 8c1dcd8 value: #<procedure 8c21d08 at ice-9/eval.scm:378:13 ()>>)) (if (#<variable 83f7948 v…> MLG! (0 0 () "en_US.UTF-8" ((())) ((help (single-char #\h) (value #f)) (boldtext (single-char #\D) (value #f)) (rebindkeypad (single-char #\K) (value #f)) (nonewlines (single-char #\L) (value #f)) (morespace (single-char #\O) (value #f)) (restricted (single-char #\R) (value #f)) (tabsizelen (single-char #\T) (value #t)) (version (single-char #\V) (value #f)) (const (single-char #\c) (value #f)) (rebinddelete (single-char #\d) (value #f)) (nofollow (single-char #\l) (value #f)) (preserve (single-char #\p) (value #f)) (quiet (single-char #\q) (value #f)) (fill (single-char #\r) (value #t)) (tempfile (single-char #\t) (value #f)) (view (single-char #\v) (value #f)) (nohelp (single-char #\x) (value #f)) (suspend (single-char #\z) (value #f))) #f 1 1 #f ("guile-ncurses-shell") . #<directory (guile-user) 84d3870>))))
scheme@(guile-user) [2]> ,up
In system/repl/debug.scm:
112:4 10 (print-frame #<frame 8eb8cf8 #<procedure eval (exp env…> ...)
scheme@(guile-user) [2]> ,up
In system/repl/debug.scm:
134:12 11 (print-frames #(#<frame 8eb66b8 #<procedure memoize…> ...) ...)
scheme@(guile-user) [2]> ,up
In ice-9/r4rs.scm:
174:4 12 (with-output-to-port #<variable 8d67248 value: #<outpu…> MLG! #<procedure 8eb35e0 at system/repl/command.scm:486:0 ()>)
scheme@(guile-user) [2]> ,up
In system/repl/command.scm:
486:0 13 (backtrace #<<repl> language: #<<language> name: scheme…>)
scheme@(guile-user) [2]>
|