bug#46009: (backtrace) crash, string->number: Wrong type argument in position 1 (expecting string): #f

Christopher Baines <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <[email protected]>
It seems that with-exception-handler might be breaking
false-if-exception inside terminal-width from (system repl debug).

I've come across this when trying to use with-exception-handler to print
backtraces for exceptions.


→ cat backtrace-crash.scm

(peek "COLUMNS" (getenv "COLUMNS"))

(with-exception-handler
    (lambda (exn)
      (backtrace))
  (lambda ()
    (+ 1 a)))


→ echo $COLUMNS
84


→ guile --no-auto-compile backtrace-crash.scm

;;; ("COLUMNS" #f)

Backtrace:
Backtrace:
          10 (primitive-load "/home/chris/Projects/Guix/guix-build-c…")
In ice-9/boot-9.scm:
  1736:10  9 (with-exception-handler _ _ #:unwind? _ # _)
In ice-9/eval.scm:
    159:9  8 (_ _)
   223:20  7 (proc #(#(#<directory (guile-user) 7f32e7dfbc80>)))
In unknown file:
           6 (%resolve-variable (7 . a) #<directory (guile-user) 7f3…>)
In ice-9/boot-9.scm:
  1669:16  5 (raise-exception _ #:continuable? _)
In unknown file:
           4 (backtrace #<undefined>)
In system/repl/debug.scm:
   148:36  3 (print-frames #(#<frame 7f32e6a22f30 backtrace> #<f…> …) …)
    72:20  2 (_)
In ice-9/boot-9.scm:
  1731:15  1 (with-exception-handler #<procedure 7f32e7e937b0 at ic…> …)
In system/repl/debug.scm:
    72:40  0 (_)

system/repl/debug.scm:72:40: In procedure string->number: Wrong type argument in position 1 (expecting string): #f
signature.asc (application/pgp-signature, 987 B)
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmAIss5fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XdWFhAAqxvsghmt27UbzFig/e23zlobghAcvyp6
k/FFMSyCiEJdecYikqOY9aiiurDVH+YlEZ5gFmaE8HKgJQsL1PeBuocsQysK3Sl3
cPYoBIXa22GDQ/v+Xmu3hzLfqqdl5eMDchL6WK3Of9MGu7kRaCysWxeVIzRjWMdf
U55ahTmCObhhaIx5KligyKQ5X0Ws9k/aLO6ULPUEL6aMD/urz/OFUFvGOfuko0N8
6xTB/VGCvRd8tvnDg53NB4qrHC02LvYpJfn05/JgvqwJnsPxNYHNLn+Ifgnwh/bO
uYFvph1jTn+qIoShXjHl00ZP1tpf7hnUOMqmzq3yJmOkK/D+ThGJBVijWuQLAwNb
bBLmXzfEhV/W/YGHzDJnSwTrLX6Yf8oGacIHrj3MTYcESF8YKxTwhvXQOok/xvZL
YabueoBoUZYgWP3Hdcu9sbnfx2ZJX1sCalq6FVPnjlafi82vjGRt4oAuvxhKfOP/
k+MR2Z81j/VLKoWvPGcXX5w61b2G81CZzhQlETIznPa7GgV2VA3WGsrMMYzuMxYM
wghZR829c3i8lzW0ir8gndjpWIsuDENs4MgIJKmDzc+9gWnWMFpGwXMsugoRek8z
Z3ptwv3ZH8qx/Q1nLUr589q+c4+HXTlbwfuLyYIHYOsPcuU/0GnpRNgNGm6b9Ir3
PPzICdd1Ie8=
=Ajxa
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.