Page MenuHomePhabricator

PNG thumbnail of SVG file not rendered correctly, mostly black
Closed, ResolvedPublic

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This also affects the display of svg image within article:

Screenshot from 2018-12-16 20-35-33.png (542×1 px, 89 KB)

Aklapper renamed this task from SVG preview doesn't render correctly for certain scale. to PNG thumbnail of SVG file not rendered correctly, mostly black.Dec 17 2018, 10:17 AM

The 800px version does not display correctly either here.

This also affects the display of svg image within article:

I'd expect that to be a PNG thumbnail too (at least here it is) and not in SVG format.

@Gilles: This makes me wonder if all thumbnail issue tasks (see list in T43371) should go to Thumbor these days?

If they're happening in production, yes.

Looks like an upstream librsvg issue.

Looks like an upstream librsvg issue.

@Gilles: Don't think so. Cannot reproduce locally version librsvg2-tools-2.44.13-1 (which is newer); the PNG output looks as expected when using rsvg-convert -o Price_discrimination_\(third_degree\).png -w 1024 Price_discrimination_\(third_degree\).svg (if that's correct?)

Furthermore, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/Price_discrimination_(third_degree).svg/799px-Price_discrimination_(third_degree).svg.png had the same issue, and after https://en.wikipedia.org/wiki/File:Price_discrimination_(third_degree).svg?action=purge and going to https://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/Price_discrimination_(third_degree).svg/799px-Price_discrimination_(third_degree).svg.png?xxx=yyy the problem has disappeared for the 799px version.

A-ha, I think it's only happening sometimes because one of the thumbor servers has a newer version of librsvg than the others! I bet that whenever the request lands on that particular server, the SVG renders fine. When it doesn't, it has the bug affecting the standard version of librsvg on Debian Stretch.

gilles@thumbor1001:~$ rsvg-convert --version
rsvg-convert version 2.40.16
gilles@thumbor1002:~$ rsvg-convert --version
rsvg-convert version 2.40.20
gilles@thumbor1003:~$ rsvg-convert --version
rsvg-convert version 2.40.16
gilles@thumbor1004:~$ rsvg-convert --version
rsvg-convert version 2.40.16
gilles@thumbor2001:~$ rsvg-convert --version
rsvg-convert version 2.40.16
gilles@thumbor2002:~$ rsvg-convert --version
rsvg-convert version 2.40.16
gilles@thumbor2003:~$ rsvg-convert --version
rsvg-convert version 2.40.16
gilles@thumbor2004:~$ rsvg-convert --version
rsvg-convert version 2.40.16
Gilles claimed this task.

Purged, now that all thumbor servers have the newer librsvg, all sizes of the image have been fixed.