Closed ralsei closed 3 years ago
Thanks for the report!
I tried to reproduce this with both Emacs 25.2 and 28.0.50. So far I can't get it to happen.
If you notice any particular pattern, that might help me narrow it down.
For instance is it always the first image after you (require pict)
?
Once it works, does it work consistently thereafter?
OTOH if you really can't spot any pattern, and "sometimes" seems to be "random", that alone might be a good clue for me.
Well this is hilarious. I went off to do something else, came back to the REPL running from trying to repro this before.
I was going to exit it. But -- on a whim, not even consciously/intentionally -- I did M-p RET to repeat the (standard-fish 100 50)
.
And bingo, I got "#<Image: /var/tmp/racket-image-16208308591620830859694.svg>"
instead of the image.
Furthermore, repeating this multiple times, I "randomly" got either an image or text.
So, although I haven't figured it out yet, I can definitely reproduce it, and answered my own questions from above.
Yeah -- on my machine it's pretty much random as to whether an image or text appears, with no discernable pattern -- sometimes just re-running the file producing an image will work, sometimes it keeps displaying text and I have to restart Emacs...
Commit 2503951 seems to fix this for me. I say "seems" because the bug is maybe more intermittent, for me, than it was for you? So I can try N times but maybe it would fail N+1. Also I don't have a super-crisp "theory of the bug"; I just noticed one edge case and protected against that.
TL;DR the commit feels more ad hoc than I'd like.
issue-535
branch, with straight.el
), I'd be grateful.Either way, thanks again for your help reporting!
This appears to have worked. Running a plot
as well as standard-fish
cause me to be unable to reproduce the aforementioned behavior. Sometimes I briefly (split-second) see the #<Image: path>
text, but it vanishes extremely quickly.
Thanks for confirming! Merged.
Issue
Sometimes, when attempting to run code that displays a
pict
(or something akin) in the racket-mode REPL, the image does not show up, and instead just displays#<Image: path-to-image>
. For example, with the same call:M-x racket-bug-report