After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 307861 - librsvg use more than 90% of memory (512 MB) to convert SVG to raster
librsvg use more than 90% of memory (512 MB) to convert SVG to raster
Status: RESOLVED NOTABUG
Product: librsvg
Classification: Core
Component: general
2.9.x
Other All
: High critical
: ---
Assigned To: librsvg maintainers
librsvg maintainers
Depends on:
Blocks:
 
 
Reported: 2005-06-16 01:41 UTC by Victor STINNER
Modified: 2005-06-16 05:06 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
Here is the "evil" file :-) (21.62 KB, image/svg+xml)
2005-06-16 01:43 UTC, Victor STINNER
Details

Description Victor STINNER 2005-06-16 01:41:11 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
  • #0 memset
    from /lib/tls/libc.so.6
  • #1 rsvg_handle_new
    from /usr/lib/librsvg-2.so.2
  • #2 rsvg_handle_get_pixbuf
    from /usr/lib/librsvg-2.so.2
  • #3 rsvg_pixbuf_from_data_with_size_data
    from /usr/lib/librsvg-2.so.2
  • #4 rsvg_pixbuf_from_data_with_size_data
    from /usr/lib/librsvg-2.so.2
  • #5 rsvg_pixbuf_from_file_at_zoom
    from /usr/lib/librsvg-2.so.2

Is it really useful ? :-P

Other information:
Comment 1 Victor STINNER 2005-06-16 01:43:06 UTC
Created attachment 47842 [details]
Here is the "evil" file :-)
Comment 2 Victor STINNER 2005-06-16 01:47:25 UTC
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.
Comment 3 Caleb Moore 2005-06-16 05:06:55 UTC
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.