Comment 8 for bug 2009331

Revision history for this message
Douglas Katzman (dougk) wrote :

Based on the example I can say that there is nothing wrong in SBCL, hunchentoot, or yason.
It's in your code.

SBCL *is* able to get a backtrace with dynamic-extent args involved.
In fact it takes some care to try to remove dynamic-extent args from the backtrace.
It's a particular problem though when objects are constructed in the manner of
 (make-instance 'thing :args (list (make-instance 'otherthing :args (list stillmorething))))
which is kind of what's going on. There's a condition of type no-applicable-method which wraps a condition of ecase-error and there are some format args that involve streams that have gone out of scope.
All these things have fancy print methods on them, and the print methods get bogus args. The bogus args in this case are a stack-allocated string-input-stream and stack-allocated string-output-stream. It's virtually impossible to work around all manner of broken-ness when, while backtracing, if it's also trying to print unprintable objects.

At line #136 of your example, don't use WITH-OUTPUT-TO-STRING, because YASON:ENCODE encodes that string into the error that it's trying to report.
At line #186, don't use WITH-INPUT-FROM-STRING. Give both string streams indefinite extent.