[plt-scheme] Apparent continuation bug
I've found a mzscheme bug that occurs only if I output a particular
string from within a servlet. Never mind for a moment what this
particular string is and call it str. If I go through a particular
series of steps in my application, then output (string-append "foo"
str), a previously-stored servlet continuation launches after the
completion of the current continuation. This happens in such a way
that the the browser never gets the original, correct page; it
displays only the second, erroneous page. A previous step in the
application determines exactly what the magic string str is to be.
Fortunately or not, I ran across a bug with the same look and feel
once before. I was writing guile scheme webapp code which used Oleg
Kiselyov's SXML XML implementation. Part of SXML is a common header
file that contains cout and cerr, which I find to be usually less
effort than the display/format combination. Both cerr and cout invoke
anything that answers to procedure? -- including continuations. So
they can produce interesting results when debugging continuation code.
My guess is that this mzscheme problem is caused by tweaking a string
that is folded between two continuations, thereby causing the wrong
continuation to launch. A good way to ascertain this is a quirk in
the behavior I see: I see the bug when outputting (string-append "foo"
str) but not (string-append " " str).
I was able to work around this problem the first time, but now I'm
seeing it again in a place where I can't so easily work around it.
I've got an important deadline coming up, so I'll be very grateful if
you someone can address this sooner rather than later.
Incidentally my application code would take the better part of a
morning to install, and I've been unable to duplicate the problem with
less code for an unknown reason. I'd be happy to download and test a
patch if someone can make an attempt to fix the problem. On the other
hand I can spend some time helping someone set up the application if
necessary.
I'm using PLT 203 on i386 Debian.
Thanks,
Don