chibi-scheme icon indicating copy to clipboard operation
chibi-scheme copied to clipboard

More incomplete stack traces [2]

Open dpapavas opened this issue 1 year ago • 2 comments

This may be related, or the same as, #835. I notice that running the following code

(let ((a (+ 1 "a")))
  (display a)
  (newline))

the resulting exception does have correct source location information set, but the stack frame is missing the relevant frame. I get:

$ chibi-scheme -xchibi -T test.scm
ERROR on line 1 of file test.scm: invalid type, expected Number: "a"
  called from <anonymous> on line 1268 of file /usr/local/share/chibi/init-7.scm
  called from <anonymous> on line 800 of file /usr/local/share/chibi/init-7.scm

On the other hand, if the error is inside the let body, e.g.

(let ((a 1))
  (display (+ 1 "a"))
  (newline))

the stack frame is complete:

$ chibi-scheme -xchibi -T test.scm
ERROR on line 1 of file test.scm: invalid type, expected Number: "a"
  called from <anonymous> on line 1 of file test.scm
  called from <anonymous> on line 1268 of file /usr/local/share/chibi/init-7.scm
  called from <anonymous> on line 800 of file /usr/local/share/chibi/init-7.scm

dpapavas avatar Aug 16 '22 15:08 dpapavas

Will take a look. Note your title is also "incoplete" :)

ashinn avatar Aug 17 '22 23:08 ashinn

Note your title is also "incoplete" :)

:laughing: Noted and corrected.

dpapavas avatar Aug 18 '22 09:08 dpapavas