Summary: | media-gfx/gimp SVGs exported by app-office/libreoffice cause segmentation fault | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jimmy C. Chau <chaujc> |
Component: | Current packages | Assignee: | Sergey Torokhov <torokhov-s-a> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | chaujc, gnome, jstein, proxy-maint, spock |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://gitlab.gnome.org/GNOME/gimp/issues/988 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | SVG file which causes segmentation fault in gimp |
Description
Jimmy C. Chau
2012-01-22 04:25:05 UTC
Some of the things missing in this report: - an sample file that crashes gimp/gqview for you - a backtrace of the crash Created attachment 299505 [details] SVG file which causes segmentation fault in gimp Attached is a file that causes the segmentation fault. I can generate more test files if you'd like (it seems like any SVG file that I export with LibreOffice Draw causes the segmentation fault). I'm having trouble generating the backtrace though. I tried following the instructions at http://www.gentoo.org/doc/en/bugzilla-howto.xml but gdb doesn't seem to notice the segmentation fault. (I set the CFLAGS, CXXFLAGS, USE, and FEATURES environment variables as described in the bugzilla-howto and re-emerged gimp.) Here's what I have from gdb: gdb --args gimp deerTruckStop.svg 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/gimp...done. (gdb) run Starting program: /usr/bin/gimp deerTruckStop.svg [Thread debugging using libthread_db enabled] (gimp:794): GLib-WARNING **: goption.c:2168: ignoring no-arg, optional-arg or filename flags (8) on option of type 0 [New Thread 0x7fffed9fb700 (LWP 797)] [New Thread 0x7fffed1fa700 (LWP 798)] /usr/lib64/gimp/2.0/plug-ins/file-svg: fatal error: Segmentation fault [Thread 0x7fffed1fa700 (LWP 798) exited] [Thread 0x7fffed9fb700 (LWP 797) exited] [Inferior 1 (process 794) exited normally] (gdb) bt No stack. (gdb) quit I'll try to figure out how to get a backtrace on my own, but do you have any suggestions for me? Thanks. Got it, following <http://developer.gimp.org/debug-plug-ins.txt>, I attached gdb to GIMP's file-svg plugin. GIMP_PLUGIN_DEBUG=file-svg gimp ./deerTruckStop.svg gdb /usr/lib64/gimp/2.0/plug-ins/file-svg 1032 [The starting output of gdb was long and is omitted; let me know if you want it.] (gdb) continue Continuing. Program received signal SIGSEGV, Segmentation fault. 0x00007f9dd80d063d in rsvg_cairo_to_pixbuf () from /usr/lib64/librsvg-2.so.2 (gdb) bt #0 0x00007f9dd80d063d in rsvg_cairo_to_pixbuf () from /usr/lib64/librsvg-2.so.2 #1 0x00007f9dd80d157f in rsvg_handle_get_pixbuf_sub () from /usr/lib64/librsvg-2.so.2 #2 0x00007f9dd9573bbe in load_rsvg_pixbuf (filename=<optimized out>, vals=<optimized out>, error=0x7fffc3361220) at file-svg.c:493 #3 0x00007f9dd95743b2 in load_image (filename=0x7f9dd9f06170 "/tmp/gqviewcrash/./deerTruckStop.svg", load_error=0x7fffc33612f0) at file-svg.c:326 #4 0x00007f9dd957591c in run (name=<optimized out>, nparams=<optimized out>, param=0x7f9dd9f06050, nreturn_vals=0x7fffc33613e4, return_vals=<optimized out>) at file-svg.c:230 #5 0x00007f9dd8bcc263 in gimp_proc_run (proc_run=0x7f9dd9ef32e0) at gimp.c:1917 #6 gimp_loop () at gimp.c:1751 #7 gimp_main (info=<optimized out>, argc=<optimized out>, argv=<optimized out>) at gimp.c:487 #8 0x00007f9dd9575c93 in main (argc=<optimized out>, argv=<optimized out>) at file-svg.c:94 (gdb) I tried it. No problem. But it consumes quite a lot of memory during import, ~4GB! (When I don't change default size offered by the import-dialog) If you have enough memory, you could try rebuilding librsvg and cairo. You're right. I have 4GB of memory plus 8GB of swap, but I do notice now that by default, the image is huge and that my memory usage reaches 87% when the segmentation fault occurs (though my swap is mostly free at 6% usage). But I rebuilt librsvg, cairo, and gimp anyway (with the debugging environment variables). Here's another backtrace of GIMP's file-svg plug-in: (gdb) continue Continuing. Program received signal SIGSEGV, Segmentation fault. rsvg_cairo_to_pixbuf (pixels=0x7f799e136010 "", 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=0x7f799e136010 "", rowstride=86360, height=27940) at /usr/include/bits/string3.h:52 #1 0x00007f7a3c314c3d in rsvg_handle_get_pixbuf_sub (handle=0x7f7a3df1a940, id=0x0) at rsvg.c:102 #2 0x00007f7a3c314cea in rsvg_handle_get_pixbuf (handle=<optimized out>) at rsvg.c:137 #3 0x00007f7a3d7b6bbe in load_rsvg_pixbuf (filename=<optimized out>, vals=<optimized out>, error=0x7fff991dd560) at file-svg.c:493 #4 0x00007f7a3d7b73b2 in load_image (filename=0x7f7a3df19170 "/tmp/gqviewcrash/./deerTruckStop.svg", load_error=0x7fff991dd630) at file-svg.c:326 #5 0x00007f7a3d7b891c in run (name=<optimized out>, nparams=<optimized out>, param=0x7f7a3df19050, nreturn_vals=0x7fff991dd724, return_vals=<optimized out>) at file-svg.c:230 #6 0x00007f7a3ce0f263 in gimp_proc_run (proc_run=0x7f7a3df062e0) at gimp.c:1917 #7 gimp_loop () at gimp.c:1751 #8 gimp_main (info=<optimized out>, argc=<optimized out>, argv=<optimized out>) at gimp.c:487 #9 0x00007f7a3d7b8c93 in main (argc=<optimized out>, argv=<optimized out>) at file-svg.c:94 (gdb) continue Continuing. [Inferior 1 (process 25050) exited normally] (gdb) Well, this is a double funny: - for me it doesn't seem to crash...well, at least till I interrupt it, as it does the memory consumption thing too (I'm still on x86 here) - on the other hand, rsvg-view{,-3} display the file almost instantly In my case gimp tries to use a huge size when trying to opening the file and, then, it eats of the memory. But if I choose a lower size, it is able to load it I would report this directly to upstream to know why gimp is trying to use that size Took it to upstream now: https://bugzilla.gnome.org/show_bug.cgi?id=772627 Upstream reports that it is fixed now: https://gitlab.gnome.org/GNOME/gimp/issues/3561 please test and report I tested it for 2.10.14 and LaTeX svg logo from gimp issue tracker and it was successfully opened. As for attached svg I'm not able to open it by default as it eat all my 4gb ram and 2 of swap. After reducing imported image size in 10 times to ~ 2000x2700 then svg quickly and successfully was opened. If it's ok on gimp 2.10.18 then could I close issue? |