Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 399685 - SVGs exported by app-office/libreoffice cause segmentation fault in media-gfx/gqview-2.1.5
Summary: SVGs exported by app-office/libreoffice cause segmentation fault in media-gfx...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-22 04:07 UTC by Jimmy C. Chau
Modified: 2013-09-30 02:47 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
An example libreoffice SVG that causes gqview to crash. (deerTruckStop.svg,527.23 KB, image/svg+xml)
2012-01-22 04:07 UTC, Jimmy C. Chau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jimmy C. Chau 2012-01-22 04:07:53 UTC
Created attachment 299499 [details]
An example libreoffice SVG that causes gqview to crash.

media-gfx/gqview-2.1.5 dies with a segmentation fault whenever it opens a folder that contains a SVG file generated by LibreOffice Draw's export feature (tested with both app-office/libreoffice-3.3.1 and app-office/libreoffice-l10n-3.4.5-r1).  

For example, when the attached deerTruckStop.svg is placed among other image files in a folder and gqview is told to open that folder, the first few other images are displayed as thumbnails and and, as usual, the first image is displayed in the main viewing area.  The status bar shows "Loading thumbs..." and gqview becomes unresponsive for several seconds before it quits and "Segmentation fault" is displayed in the terminal used to run gqview.  

If deerTruckStop.svg is the only image in the folder, gqview becomes immediately unresponsive upon opening that folder.  If gqview is told to open that folder at startup (e.g., "gqview /tmp/folderwithsvg/"), gqview appears as a completely blank window.  

This happens regardless of whether gqview is built with the lcms use flag and has been reliably repeatable.  



To reproduce:
1. Open LibreOffice Draw.
2. Make a sketch (optional; it'll crash even if the drawing is blank)
3. File -> Export...
   Export it as a "SVG - Scalable Vector Graphics (.svg)"
4. Open gqview and have gqview open the folder containing the exported SVG file.



I don't know if the bug is in LibreOffice, gqview or both, but I believe that gqview should not experience a segmentation fault even if the SVG file is malformed.  

Testing the attached SVG file with other programs, I get the following results:
- gimp is able to display the SVG file as a preview in the "Render Scalable Vector Graphics" window that appears when opening the SVG, but also experiences a segmentation fault when opening the SVG ("/usr/lib64/gimp/2.0/plug-ins/file-svg: fatal error: Segmentation fault").
- But inkscape, firefox, and chromium are able to open the SVG file without segmentation faults.  


Let me know if I can help by providing more information.



emerge --info gqview libreoffice gimp:
Portage 2.1.10.41 (hardened/linux/amd64, gcc-4.5.3, glibc-2.13-r4, 3.1.6-gentoo-2012Jan05 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.1.6-gentoo-2012Jan05-x86_64-Intel-R-_Core-TM-2_Duo_CPU_U9400_@_1.40GHz-with-gentoo-2.0.3
Timestamp of tree: Sat, 21 Jan 2012 20:15:01 +0000
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.1.4-r3
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA @BINARY-REDISTRIBUTABLE AdobeFlash-10.1 PUEL"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -msse4.1"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -O2 -pipe -msse4.1"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.netnitco.net      http://gentoo.mirrors.tds.net/gentoo    http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/     http://distfiles.gentoo.org     http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en"
MAKEOPTS="--jobs=4 --load-average=2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 berkdb bzip2 cairo caps cjk cli consolekit cracklib crypt cups cxx dbus dri dvd exif ffmpeg flac gdbm gnutls gpm hal hardened iconv ipv6 jpeg justify laptop lcms mmx modules mp3 mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pax_kernel pcre png ppds pppd readline sdl session spell sse sse2 ssl ssse3 sysfs system-sqlite tcpd theora threads truetype unicode urandom v4l vorbis xinerama xorg xv xvmc zlib" ALSA_CARDS="hda-intel usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LINGUAS="en_US en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

media-gfx/gqview-2.1.5 was built with the following:
USE="(multilib) -lcms"


app-office/libreoffice-3.4.5.2 was built with the following:
USE="branding dbus java (multilib) opengl (-aqua) -binfilter -custom-cflags -debug -eds -gnome -graphite -gstreamer -gtk -jemalloc -kde -mysql -nsplugin -odk -pdfimport -python -test -vba -webdav"
CFLAGS="-march=core2 -pipe"
CXXFLAGS="-march=core2 -pipe"


media-gfx/gimp-2.6.11-r5 was built with the following:
USE="alsa dbus exif jpeg lcms mmx (multilib) pdf png smp sse svg tiff -aalib (-altivec) -curl -debug -doc -gnome -mng -python -webkit -wmf"
Comment 1 Jimmy C. Chau 2012-01-22 04:27:35 UTC
I created bug 399687 for the segmentation fault that appears for gimp.
Comment 2 Jimmy C. Chau 2012-01-22 08:56:48 UTC
Here's a backtrace for a folder containing the attached SVG.

gdb --args gqview ./
GNU gdb (Gentoo 7.3.1 p2) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/bin/gqview...done.
(gdb) run
Starting program: /usr/bin/gqview ./
[Thread debugging using libthread_db enabled]
GQview 2.1.5, This is a beta release.

Program received signal SIGSEGV, Segmentation fault.
0x00007fffeb81663d in rsvg_cairo_to_pixbuf () from /usr/lib64/librsvg-2.so.2
(gdb) bt
#0  0x00007fffeb81663d in rsvg_cairo_to_pixbuf () from /usr/lib64/librsvg-2.so.2
#1  0x00007fffeb81757f in rsvg_handle_get_pixbuf_sub () from /usr/lib64/librsvg-2.so.2
#2  0x00007fffeba24f0b in ?? () from /usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
#3  0x00007ffff72404b9 in gdk_pixbuf_loader_close () from /usr/lib64/libgdk_pixbuf-2.0.so.0
#4  0x00005555555aa258 in image_loader_stop (il=0x555555a03850) at image-load.c:123
#5  0x00005555555aa54e in image_loader_begin (il=0x555555a03850) at image-load.c:258
#6  image_loader_setup (il=0x555555a03850) at image-load.c:303
#7  0x00005555555aaccd in image_loader_start (il=<optimized out>, func_done=<optimized out>, data_done=<optimized out>) at image-load.c:436
#8  0x00005555555ecf4e in thumb_loader_std_setup (tl=0x555555a037b0, path=<optimized out>) at thumb_standard.c:626
#9  0x00005555555ed89a in thumb_loader_std_start (tl=0x555555a037b0, path=<optimized out>) at thumb_standard.c:691
#10 0x00005555555ebfc9 in thumb_loader_start (tl=0x555555a037b0, path=<optimized out>) at thumb.c:318
#11 0x000055555560117e in vficon_thumb_next (vfi=0x5555559b9150) at view_file_icon.c:1875
#12 0x0000555555601663 in vficon_thumb_update (vfi=0x5555559b9150) at view_file_icon.c:1894
#13 vficon_populate (vfi=0x5555559b9150, resize=<optimized out>, keep_position=<optimized out>) at view_file_icon.c:1593
#14 0x0000555555602726 in vficon_refresh_real (vfi=0x5555559b9150, keep_position=0) at view_file_icon.c:2045
#15 0x0000555555603d51 in vficon_set_path (vfi=0x5555559b9150, path=0x5555559bb850 "/tmp/gqviewcrash") at view_file_icon.c:2186
#16 0x00005555555b2d25 in layout_sync_path (lw=0x5555558a2800) at layout.c:912
#17 layout_set_path (lw=0x5555558a2800, path=0x5555558a20f0 "/tmp/gqviewcrash") at layout.c:955
#18 0x00005555555becaa in main (argc=2, argv=0x7fffffffdef8) at main.c:1409
(gdb)
Comment 3 Jimmy C. Chau 2012-01-22 09:01:13 UTC
In case it matters, for the backtrace in comment 2:

media-gfx/gqview-2.1.5 was built with the following:
USE="lcms (multilib)"
CFLAGS="-O1 -pipe -ggdb"
CXXFLAGS="-O1 -pipe -ggdb"

(The lcms useflag was re-enabled, unlike in comment 1)
Comment 4 Jimmy C. Chau 2012-01-24 02:57:47 UTC
Here's another backtrace with debugging enabled for librsvg.

Program received signal SIGSEGV, Segmentation fault.
rsvg_cairo_to_pixbuf (pixels=0x7fff58aa4010 "", rowstride=86360, height=27940) at /usr/include/bits/string3.h:52
52        return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
(gdb) bt
#0  rsvg_cairo_to_pixbuf (pixels=0x7fff58aa4010 "", rowstride=86360, height=27940) at /usr/include/bits/string3.h:52
#1  0x00007fffeb823c3d in rsvg_handle_get_pixbuf_sub (handle=0x5555559e5a80, id=0x0) at rsvg.c:102
#2  0x00007fffeb823cea in rsvg_handle_get_pixbuf (handle=<optimized out>) at rsvg.c:137
#3  0x00007fffeba30eed in gdk_pixbuf__svg_image_stop_load (data=0x5555559d2ef0, error=0x7fffffffd650) at io-svg.c:154
#4  0x00007ffff72404b9 in gdk_pixbuf_loader_close () from /usr/lib64/libgdk_pixbuf-2.0.so.0
#5  0x00005555555aa258 in image_loader_stop (il=0x5555559ffe20) at image-load.c:123
#6  0x00005555555aa54e in image_loader_begin (il=0x5555559ffe20) at image-load.c:258
#7  image_loader_setup (il=0x5555559ffe20) at image-load.c:303
#8  0x00005555555aaccd in image_loader_start (il=<optimized out>, func_done=<optimized out>, data_done=<optimized out>) at image-load.c:436
#9  0x00005555555ecf4e in thumb_loader_std_setup (tl=0x555555a01690, path=<optimized out>) at thumb_standard.c:626
#10 0x00005555555ed89a in thumb_loader_std_start (tl=0x555555a01690, path=<optimized out>) at thumb_standard.c:691
#11 0x00005555555ebfc9 in thumb_loader_start (tl=0x555555a01690, path=<optimized out>) at thumb.c:318
#12 0x000055555560117e in vficon_thumb_next (vfi=0x5555559b8e60) at view_file_icon.c:1875
#13 0x0000555555601663 in vficon_thumb_update (vfi=0x5555559b8e60) at view_file_icon.c:1894
#14 vficon_populate (vfi=0x5555559b8e60, resize=<optimized out>, keep_position=<optimized out>) at view_file_icon.c:1593
#15 0x0000555555602726 in vficon_refresh_real (vfi=0x5555559b8e60, keep_position=0) at view_file_icon.c:2045
#16 0x0000555555603d51 in vficon_set_path (vfi=0x5555559b8e60, path=0x5555559ba970 "/tmp/gqviewcrash") at view_file_icon.c:2186
#17 0x00005555555b2d25 in layout_sync_path (lw=0x5555558a2600) at layout.c:912
#18 layout_set_path (lw=0x5555558a2600, path=0x5555558a3130 "/tmp/gqviewcrash") at layout.c:955
#19 0x00005555555becaa in main (argc=2, argv=0x7fffffffdef8) at main.c:1409



When the segmentation fault occurs, I notice that gqview is using a lot of memory (2615348K out of my 4GB of RAM; my 8GB of swap appears to be unused though, so I don't think that this problem is entirely due to my system running out of memory).  



emerge --info librsvg
Portage 2.1.10.41 (hardened/linux/amd64, gcc-4.5.3, glibc-2.13-r4, 3.1.6-gentoo-2012Jan05 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.1.6-gentoo-2012Jan05-x86_64-Intel-R-_Core-TM-2_Duo_CPU_U9400_@_1.40GHz-with-gentoo-2.0.3
Timestamp of tree: Mon, 23 Jan 2012 04:45:01 +0000
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.1.4-r3
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA @BINARY-REDISTRIBUTABLE AdobeFlash-10.1 PUEL"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -msse4.1"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -O2 -pipe -msse4.1"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.netnitco.net      http://gentoo.mirrors.tds.net/gentoo    http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/     http://distfiles.gentoo.org     http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en"
MAKEOPTS="--jobs=4 --load-average=2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 berkdb bzip2 cairo caps cjk cli consolekit cracklib crypt cups cxx dbus dri dvd exif ffmpeg flac gdbm gnutls gpm hal hardened iconv ipv6 jpeg justify laptop lcms mmx modules mp3 mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pax_kernel pcre png ppds pppd readline sdl session spell sse sse2 ssl ssse3 sysfs system-sqlite tcpd theora threads truetype unicode urandom v4l vorbis xinerama xorg xv xvmc zlib" ALSA_CARDS="hda-intel usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LINGUAS="en_US en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

gnome-base/librsvg-2.34.2 was built with the following:
USE="gtk (multilib) -doc -gtk3 -introspection -tools"
CFLAGS="-O1 -pipe -ggdb"
CXXFLAGS="-O1 -pipe -ggdb"
Comment 5 Mr. Bones. (RETIRED) gentoo-dev 2012-01-25 16:03:52 UTC
gqview doesn't know anything about images natively. If a picture fails to load it's because the libraries it uses don't know how to interact with the picture.
Redirecting to the gnome team.
Comment 6 Pacho Ramos gentoo-dev 2012-01-30 11:46:55 UTC
This is strange:
- rsvg-view* utils open that file fine.
- But eog eats a lot of memory and gimp needs to be killed to prevent my system to get out of memory :S
Comment 7 Tomáš Chvátal (RETIRED) gentoo-dev 2013-03-06 21:33:05 UTC
One year to this bug and I still can't get it fail under KDE. Could you try libreoffice-4.0 export filter as it was rewritten compared to 3.x series so it produces completely different results?
Comment 8 Jimmy C. Chau 2013-05-23 06:40:19 UTC
Sorry, I ended up re-installing Gentoo on my computer due to unrelated hardware failures.  

Since the original bug report, gqview seems to fail more gracefully with exported SVG files from LibreOffice Draw.  Instead of crashing, it simply shows an icon depicting a broken image file.  gqview is able to view SVG files from Inkscape though.   

Gimp is able to open (import) the SVG files exported from LibreOffice Draw, but only if I reduce the width and height setting to something more reasonable when I import the SVG.  When importing a US letter sized (8.5 x 11 inches) drawing generated by LibreOffice Draw (such as the attached drawing from 2012-01-21), Gimp dafaults to a width and height of 21590 by 27940 pixels.  This is 2540 pixels per inch.  If I keep this default size (for a 603 gigapixel image), Gimp fails to import the SVG and outputs the following error messages to stderr:

(file-svg:5556): GLib-WARNING **: (gerror.c:390):g_error_new_valist: runtime check failed: (domain != 0)

(gimp:5552): GLib-WARNING **: (gerror.c:390):g_error_new_valist: runtime check failed: (domain != 0)


Checking the XML text of the SVG file exported from LibreOffice Draw, this 21590x27940 seems to be the dimension specified:
<svg version="1.1" viewBox="0 0 21590 27940" preserveAspectRat
io="xMidYMid" fill-rule="evenodd" xmlns="http://www.w3.org/2000/svg" xmlns:xlink
="http://www.w3.org/1999/xlink">


From this information, I suspect that problem results because
- LibreOffice Draw exports SVGs with large dimension values and
- some programs (gimp, gqview) try to render vector graphics as raster images with one pixel per unit dimension, resulting in problematically large raster images.  


I think that ideally, when rendering vector graphics, gqview (or GTK+?) should not assume that one unit dimension should be rendered as one pixel; instead, it should rendered to have just enough pixels to fit the viewing area.  (e.g., if I'm viewing an SVG on a 1024x768 resolution screen, the rendered image doesn't need to have more than 1024x768 resolution.)  Otherwise, SVG files may act very much like a zip bombs (small file that consumes a lot of memory when opened).  


I haven't tried LibreOffice-4 yet, but I will when I get a chance.  


Here's and updated emerge --info gqview libreoffice gimp gtk+
Portage 2.1.11.62 (hardened/linux/amd64, gcc-4.6.3, glibc-2.15-r3, 3.8.13-gentoo-2013Apr17 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.8.13-gentoo-2013Apr17-x86_64-Intel-R-_Core-TM-2_Duo_CPU_U9400_@_1.40GHz-with-gentoo-2.2
KiB Mem:     8063436 total,   5412428 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of tree: Thu, 23 May 2013 00:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA @BINARY-REDISTRIBUTABLE AdobeFlash-11.x Google-TOS PUEL"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -msse4.1"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -O2 -pipe -msse4.1"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch webrsync-gpg xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.netnitco.net      http://gentoo.mirrors.tds.net/gentoo    http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/     http://distfiles.gentoo.org     http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="--jobs=4 --load-average=2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC=""
USE="X aac acl alsa amd64 berkdb bluetooth bzip2 cairo caps cjk cli consolekit cracklib crypt cups cxx dbus dri dvd exif ffmpeg flac gdbm gnutls gpm gstreamer hal hardened iconv ipv6 jpeg justify laptop lcms mmx modules mp3 mudflap multilib ncurses nls nptl ogg opengl openmp pam pax_kernel pcre png ppds readline sdl session spell sse sse2 ssl ssse3 system-sqlite tcpd theora threads truetype unicode urandom v4l vaapi vorbis xinerama xv xvmc zlib" ABI_X86="64" ALSA_CARDS="hda-intel usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_US en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

media-gfx/gqview-2.1.5 was built with the following:
USE="lcms (multilib)" ABI_X86="64"


app-office/libreoffice-3.6.6.2 was built with the following:
USE="branding cups dbus gstreamer gtk java opengl webdav (-aqua) -binfilter -binfilterdebug -eds -gnome -jemalloc -kde -mysql -odk -postgres -test -vba" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer -nlpsolver -pdfimport -scripting-beanshell -scripting-javascript -wiki-publisher" PYTHON_SINGLE_TARGET="python2_7 -python2_5 -python2_6" PYTHON_TARGETS="python2_7 -python2_5 -python2_6"


media-gfx/gimp-2.6.12-r5 was built with the following:
USE="alsa dbus exif jpeg lcms mmx (multilib) pdf png smp sse svg tiff -aalib (-altivec) -curl -debug -doc -gnome -mng -python -webkit -wmf" ABI_X86="64" LINGUAS="-am -ar -ast -az -be -bg -ca -ca@valencia -cs -da -de -dz -el -en_CA -en_GB -eo -es -et -eu -fa -fi -fr -ga -gl -gu -he -hi -hr -hu -id -is -it -ja -ka -kk -km -kn -ko -lt -lv -mk -ml -mr -ms -my -nb -nds -ne -nl -nn -oc -or -pa -pl -pt -pt_BR -ro -ru -rw -si -sk -sl -sr -sr@latin -sv -ta -th -tr -tt -uk -vi -xh -yi -zh_CN -zh_HK -zh_TW"


x11-libs/gtk+-2.24.17 was built with the following:
USE="cups xinerama (-aqua) -debug -examples -introspection -test -vim-syntax"
CFLAGS="-march=core2 -O2 -pipe"
CXXFLAGS="-march=core2 -O2 -pipe"


x11-libs/gtk+-3.4.4 was built with the following:
USE="X cups (multilib) xinerama (-aqua) -colord -debug -examples -introspection (-packagekit) -test -vim-syntax (-wayland)" ABI_X86="64"
CFLAGS="-march=core2 -O2 -pipe"
CXXFLAGS="-march=core2 -O2 -pipe"
Comment 9 Pacho Ramos gentoo-dev 2013-09-29 09:08:59 UTC
Please retry with gdk-pixbuf-2.28.2
Comment 10 Jimmy C. Chau 2013-09-30 02:47:43 UTC
The bug appears to have been fixed (tested with app-office/libreoffice-4.0.4.2 using both gqview and gimp).  No problems were encountered using either gdk-pixbuf-2.26.4 or gdk-pixbuf-2.28.2.  Thanks!