Snap! crash with fill at edge of stage

A student of mine is getting a crash, I've narrowed it down to calling fill when the pen location is at (or within 1 pixel of?) the edge of the stage.

Ironically, when the Brave-browser tab crashes, it says 'Aw Snap!' (even with the exclamation point!)

i confirm the crash in chrome too...(at -181)

Same here.

it says "Aw, Snap!" for me too!

If you remove the block making the shape, it doesn't crash.

This project doesn't seem to crash, however
https://snap.berkeley.edu/snap/snap.html#present:Username=legoman3.14&ProjectName=fill_crash&editMode&noRun

Interesting, in the end it's like the same circle-drawing except with turn and move instead of go to

also if I don't run the script it doesn't crash :slight_smile:

When I run it, it stops at -181, then my browser starts saying "This page is slowing down firefox.". But it doesn't say "Aw Snap!"

"Aw Snap!" is probably a Chromium/Chrome/Brave error

also, my student can't just switch to a different implementation of a circle, his project is actually drawing a toothed gear, not just a circle

Actually, in firefox, it will display a fullscreen error if it does crash.

Also, I tried reproducing by bringing a filled square onto the screen, that didn't work (that is to say, it did work, it did not reproduce the crash)

draw a square around the screen before drawing the circle !
https://snap.berkeley.edu/project?user=loucheman&project=forum%20help%20-%20fill_crash

I was just trying to see if it was a general problem for filling on the edge of he stage, or just with that block.

Yes, an interesting test. Curious why one method of drawing a 'circle' has this fill problem and another does not. Seems like the actual pixels drawn that need to be filled could be identical either way.

Hey cool thanks, a 1pix box around the frame is a pretty good workaround!

I will recommend that to my student.

(Also check it out, this is forum post number 8999 -- so close!)

image
But why would the fill function be invalid, privileged or ill-formed..?

I slightly modified the script to add another test: if you pull the draw/fill out of the loop and do it specifically for y=-181 only, it does not crash.

i broke it Snap! Build Your Own Blocks