GNOME Bugzilla – Bug 307861
librsvg use more than 90% of memory (512 MB) to convert SVG to raster
Last modified: 2005-06-16 05:06:55 UTC
Steps to reproduce: 1. Download http://www.haypocalc.com/tmp/cheese_mateya_01.svg 1. rsvg cheese_mateya_01.svg -d 10 -p 10 out.png 2. kill it (CTRL+C) because it uses to much RAM :-( Stack trace: (gdb) run cheese_mateya_01.svg -d 10 -p 10 out.png (...) (gdb) where
+ Trace 61084
Is it really useful ? :-P Other information:
Created attachment 47842 [details] Here is the "evil" file :-)
I tryed to open the file with Inkscape (no problem), and save it into a new file : rsvg handle the new file without any problem.
The reason this doesn't seem to behave is that if there is no width and height attributes specified by the <svg> element or command line arguments, rsvg will use the viewbox width and height for the width and height of the output picture. In this case those dimentions are 10534*16000 or 674 MB which is why your computer could not chew it over. If you want to fix this, either put something like 'width="100" height="100"' in the <svg> element in that file, or invoke rsvg-view with the arguments '-w 100 -h 100' and everything will be fine (albeit tiny, you might want to change it to 1000 or so). Despite the reported behavior being something that we do not plan to change, this bug report helped me find a nasty regression bug in the CVS HEAD, so the bug report helped a lot anyway. Thank you.