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 518640 - Crash when trying to preview SVGs
Crash when trying to preview SVGs
Status: RESOLVED FIXED
Product: librsvg
Classification: Core
Component: general
2.22.x
Other All
: Normal critical
: ---
Assigned To: librsvg maintainers
librsvg maintainers
: 549550 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-02-25 15:43 UTC by François Guerraz
Modified: 2008-11-22 16:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Catch self-reference attempts and drop them (2.35 KB, patch)
2008-09-01 10:51 UTC, palfrey
none Details | Review

Description François Guerraz 2008-02-25 15:43:29 UTC
Steps to reproduce:
Open a folder containing a specific SVG file.

Stack trace:
(Not very usefull I know :)

Backtrace was generated from '/usr/bin/gnome-search-tool'

(no debugging symbols found)
Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1223857984 (LWP 11589)]
[New Thread -1227142256 (LWP 11604)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0xb7f7f410 in __kernel_vsyscall ()

Thread 1 (Thread -1223857984 (LWP 11589))

  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/i686/cmov/libpthread.so.0
  • #2 gnome_gtk_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #3 <signal handler called>
  • #4 _dl_debug_state
    from /lib/ld-linux.so.2
  • #5 ??
    from /lib/ld-linux.so.2
  • #6 ??
  • #7 ??
  • #8 ??
  • #9 ??
  • #0 __kernel_vsyscall


Other information:
nautilus crashes when trying to preview svg files
This seems to happen with a specific svg file I uploaded here for you http://www.fgv6.net/upload/384637-1.svg which I know to be malformed.

Crashes in Debian Etch and Ubuntu.
Comment 1 François Guerraz 2008-02-25 16:23:41 UTC
Opening the file with rsvg-view eats all the memory and miserably fails... So maybe it's a librsvg2 bug...
Comment 2 Cosimo Cecchi 2008-02-25 19:19:25 UTC
-> librsvg.

Eog hangs too when opening this image, so reassigning to librsvg.
Comment 3 palfrey 2008-08-26 15:49:03 UTC
Reproduced with 2008-08-26 SVN head.

Eeek... that's a really evil recursion case. Should this sort of case be possibly caught? e.g. keep a track of the refs to get to a particular location, so #a -> #b -> #c (where 'x -> y' means that the block called 'x' refers to the block called 'y') and disallow (ignore?) anything that attempts reference to a previously ref'ed item.

5.3.1 of the SVG 1.1 spec (http://www.w3.org/TR/SVG11/struct.html#HeadOverview) seems to indicate ("URI references that directly or indirectly reference themselves are treated as invalid circular references") that circular references are invalid and so rsvg could legitimately kill this sort of case.
Comment 4 palfrey 2008-08-29 17:06:11 UTC
*** Bug 549550 has been marked as a duplicate of this bug. ***
Comment 5 palfrey 2008-09-01 10:51:31 UTC
Created attachment 117752 [details] [review]
Catch self-reference attempts and drop them

This patch keeps track of references (as I suggested in Comment #3) and stops any attempt to reference an earlier reference. It works both with the testcase from this bug, and the one from Bug 549550 (patch is against 2008-09-01 SVN head). The latter causes rsvg-view to conclude it can't display the image at all, so we may need to find a good test case that has attempts at self-reference but should still have *some* valid output just to check this patch doesn't kill everything off (it has been briefly tested against a couple of known good images and doesn't appear at first glance to have broken anything else).
Comment 6 Dominic Lachowicz 2008-11-22 16:47:34 UTC
Thanks, Tom. I applied this a little while ago and forgot to close the bug.