Bug#298225: nautilus eats all memory and dies thumbnailing .SVG file

Josselin Mouette 298225@bugs.debian.org, 298225@bugs.debian.org
Sun, 06 Mar 2005 18:27:22 +0100


--=-1c0pmTVDzf4MuHdYHo2M
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Le samedi 05 mars 2005 =C3=A0 11:38 -0800, Ansel Sermersheim a =C3=A9crit :
> Package: nautilus
> Version: 2.8.2-2
> Severity: normal
>=20
>=20
> Apparently nautilus, or some component thereof, can't handle SVG files
> exported from Gnumeric graphs. Enclosed is a sample SVG file created by
> right-clicking on a graph in Gnumeric and selecting 'Save as Image'. If
> I navigate in Nautilus to a directory containing this SVG, nautilus
> becomes unresponsive, eats memory rapidly and thrashes swap until being
> killed and auto-restarted.

I wonder whether this is really a gnumeric or libart/librsvg bug.
However, it is probably easier to fix it in gnumeric. The crash is
caused by the latest points in this path :
[ ... ] 82.5186L196.836 -154.556L201.669 -391.63L206.502 -1.16948e
+12L211.335 -2.33897e+12

As the picture looks, I guess this is because the original graph
contains some points far off the screen. This is reflected in the SVG
file, as the SVG generator doesn't check that, and it is perfectly
valid. However, the SVG file cannot be rendered by most SVG readers
because they try to create a rendering area that includes these points.
The solution is for either gnumeric's SVG generator or librsvg's
renderer to check that the point is off-screen and to replace it by a
point that makes the path look the same but that's inside the rendering
area.

In short, this is not really a bug but a design error. It's just like
trying to load a 100MB JPEG file.
--=20
 .''`.           Josselin Mouette        /\./\
: :' :           josselin.mouette@ens-lyon.org
`. `'                        joss@debian.org
  `-  Debian GNU/Linux -- The power of freedom

--=-1c0pmTVDzf4MuHdYHo2M
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Ceci est une partie de message
	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQBCKz15rSla4ddfhTMRAltEAJ9f7s9fip5hMKOHnIB6fxh+G1iRMwCg033v
D92+JlIzvdppZr78ksrYXcs=
=ttN2
-----END PGP SIGNATURE-----

--=-1c0pmTVDzf4MuHdYHo2M--