Discuss Scratch

BFDISuperFan
Scratcher
100+ posts

SVG Graphics with Gradients Crash the Costume Editor

Update: Originally I said that complex gradients crash the editor, but that doesn't seem to be the case. I also tested 2-node gradients by modifying the graphic in the original editor (Inkscape) to not have the middle node. Despite doing that, the editor still crashes for this new costume, so it's still the gradient, but not necessarily because it has more than 2 nodes.

My browser / operating system: MacOS Macintosh X 10.15.7, Chrome 96.0.4664.55, No Flash versions detected

I am making a graphic with several objects. One of these objects has a gradient with 3 nodes. While it renders perfectly fine in the project when imported, it crashes the editor when selected.

I'm confident it's the gradient that causes this, because when I modify the graphic to have a solid fill instead, I can view it with no problems.

I'm not too surprised since the Costume Editor only allows you to give an SVG object a 2-node gradient, but what I am surprised about is that the editor crashes even if I didn't try to edit the costume in anyway.

Normally I wouldn't mind this, but this becomes a problem because I am unable to import more costumes once the entire costume editor has crashed.

This problem could be avoided by making sure that you never open the editor when a sprite is on this costume, and by making sure you never click on costumes with complex gradients in your costume list, but having to save and reload to continue working on my project, as well as treating these costumes like landmines is an inconvenience.

You can test it out for yourself here: https://scratch.mit.edu/projects/613176674/

Last edited by BFDISuperFan (Dec. 8, 2021 20:46:08)

Him_is_bob
Scratcher
75 posts

SVG Graphics with Gradients Crash the Costume Editor

Maybe it is related to svgs being vector and scratch editor doesn't really know how to handle a vector gradient.

Powered by DjangoBB