Simple SVG that fails to load

Square with Rounded Corners

The attached SVG fails to load. Takes a few seconds of “rendering your design…” and then:

50 PM

I down loaded the file, had the same problem on loading it.
I opened the file in Affinity Designer and did an export as SVG and it opened fine.
I did not see any thing wrong with the original file, so I cannot tell you what was wrong.
What program did you use to make the file? Did you save it as a plain SVG?

This exported file loaded fine


Yep, same here. Don’t see anything wrong with the file, it must be something in how the SVG was created. I couldn’t load your original, but once I opened it in Illustrator and saved it again using the standard Save As settings for SVG, it loaded just fine.

Oops. Critical detail.

It is from Inkscape. Tried both Inkscape and plain SVG.

First time I have had an issue like this and it is a dead simple file!

I made it to cut a design out of something.

I tried removing individual elements in the SVG (as in: the SVG “code”, via a text editor, not a graphics app) and it boils down to the “ry” parameter being set to 0 that causes GFUI to fail.

The SVG specs state:

For the <rect> element, this attribute defines the y-axis radius of the ellipse used to round off the corners of the rectangle. If a properly specified value is provided for ry but not for rx (or the opposite), then the browser will consider the missing value equal to the defined one.

This means that the GFUI SVG parser should use the rx param (in this SVG it’s 6.8347807) as the ry param value. It is not. :slight_smile:

If you set the ry value to anything other than 0 via text editor, the rectangle renders correctly in GFUI (though you have to set it to the same as rx to get the correct result).

Definitely a GFUI SVG parsing bug :bug:


Cool. Hopefully, the GF support staff will translate this into a bug for engineering.

Thanks for letting us know about this, @bbum. Awesome detective work, @gwygonik! I’ve let the team know about this and we’ll look into it. In the meantime, here’s a fix you can try in Inkscape:

  1. Open the file in Inkscape
  2. Select the rectangle
  3. Choose Path > Object to Path
  4. Save the file as a Plain SVG
  5. Upload and print

Let me know if this helps. Thanks again!

1 Like