Last modified: 2014-11-18 18:07:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T51061, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49061 - Lines missing in thumbnail of SVG diagram
Lines missing in thumbnail of SVG diagram
Status: NEW
Product: Wikimedia
Classification: Unclassified
SVG rendering (Other open bugs)
All All
: Low minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
Blocks: svg
  Show dependency treegraph
Reported: 2013-06-02 16:32 UTC by Tisza Gergő
Modified: 2014-11-18 18:07 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

result of SVG -> PNG conversion on Win 7 / rsvglib 2.36.1 (1.99 KB, image/png)
2013-06-04 20:23 UTC, Tisza Gergő
difference between PNG generated by MediaWiki and PNG generated on a Win 7 machine (459 bytes, image/png)
2013-06-04 20:24 UTC, Tisza Gergő

Description Tisza Gergő 2013-06-02 16:32:39 UTC
On [[hu:File:Klavám.svg]] three line segments are missing from the thumbnails, even through Firefox displays the image correctly. Manually converting with librsvg 2.36.1 (via this Windows build: did not yield the same error. SVGcheck ( showed the same error as Wikipedia. The SVG validates, and as far as I can see the definition for the missing line segments does not at all differ from the rest.
Comment 1 Andre Klapper 2013-06-03 08:36:53 UTC
Thanks for reporting this.

> even through Firefox displays the image correctly

Not the case for me. is shown correctly in Google Chrome 27 and Opera 12.14 (and Inkscape 0.48) for me, and incorrectly only in Firefox 21.

Hence I assume that Firefox's SVG rendering is to blame (bug reports should go to ), and that there is no bug on the Wikimedia side.
Do you agree? And if not, I'd love to understand why. :)
Comment 2 Tisza Gergő 2013-06-03 21:38:37 UTC
For me Firefox 21 (on Win 7) is correct, but even if on some systems it is not, that is, as you say, an upstram bug. The real problem is that the thumbnails generated by MediaWiki are wrong (and on my machine rsvg-convert got it right, so this is not simply a librsvg bug).

(In the meantime, a new version of the file was uploaded; the one I am referring to in the bug report is . I see the same error with new version as well, though.)
Comment 3 Andre Klapper 2013-06-04 11:36:08 UTC
(In reply to comment #2)
> The real problem is that the thumbnails generated by MediaWiki are wrong

Why do you think so? Why is this not a bug in the library used by Firefox on the specific OS/platform?

> so this is not simply a librsvg bug

Not necesarily, if you use a newer version than librsvg 2.36.1 and if there was a bugfix for that (though unlikely).
Comment 4 Tisza Gergő 2013-06-04 17:52:59 UTC
I used librsvg 2.36.1, as noted in the bug description. Using the same librsvg version on my machine gave a different image than the thumbnail (which was generated by the same version of librsvg, running on the Wikimedia servers) - this problem has nothing whatsoever to do with Firefox. Given that that Inkscape and most browsers give the same result that I got (where all five lines of the pentagon is visible on the left side), it is almost certainly MediaWiki that gets it wrong, and the bug is probably a configuration problem.
Comment 5 Andre Klapper 2013-06-04 18:42:56 UTC
> gave a different image than the thumbnail

As SVG is not a binary file format, a [[en:diff]] could be interesting then to see the different lines in the file.
Comment 6 Tisza Gergő 2013-06-04 20:23:17 UTC
Created attachment 12461 [details]
result of SVG -> PNG conversion on Win 7 / rsvglib 2.36.1
Comment 7 Tisza Gergő 2013-06-04 20:24:10 UTC
Created attachment 12462 [details]
difference between PNG generated by MediaWiki and PNG generated on a Win 7 machine
Comment 8 Tisza Gergő 2013-06-04 20:45:12 UTC
I am not sure we are on the same page here :-)

There is an SVG file:
MediaWiki converts it to this thumbnail (using librsvg 2.36.1, if I understand correctly):
My machine (Win 7, also using librsvg 2.36.1) converts it to this image:

These are binary files, so a source diff would not be very instructive, but here is a XOR diff of the images:
As you can see, three lines are missing in the MediaWiki version. (There are some additional tiny differences, though maybe I just did not get the resolution exactly right.)

I tried several different tools, with this result:
lines missing: Wikipedia, librsvg 2.36.1 on Linux (precise64 vagrant box), GIMP
lines there: librsvg 2.36.1 on Windows, Inkscape, Firefox, Chrome, Safari, IE10

I thought maybe the rsvg converter used on Wikimedia sites has some problematic config option set. I'm not familiar with librsvg and don't know how much its behavior depends on configuration, or compilation flags. If you say there is nothing that can be done about this on the Wikimedia side, I'll forward the bug to the librsvg project.
Comment 9 Andre Klapper 2013-06-05 11:25:13 UTC
Yeah, I'm sorry for my confusing comments, thanks for clarifying.

I downloaded to a machine with librsvg2-2.34.2-1 and I ran locally
     rsvg-convert -f png ~/Klavám.svg -o ~/Klavám.png
GNOME's EOG 3.2 and GIMP 2.6 display the same incorrect PNG image with three missing lines. Both applications use librsvg as far as I know.

Using rsvg-convert on a more recent machine (Fedora 19, librsvg2-tools-2.37.0-3, Firefox 21) the SVG is still wrong in Firefox, but the resulting PNG is correctly displayed in Firefox, and also correctly in GIMP 2.8.

Hence I still think that this is an issue with older versions of librsvg.

Note You need to log in before you can comment on or make changes to this bug.