Inkscape crashes on export SVG => PDF

Bug #882069 reported by Kevin van der Vlist
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
High
Unassigned

Bug Description

As soon as I try to export the attached SVG to PDF, inkscape crashes with the following message:

inkscape: /tmp/buildd/cairo-1.10.2/src/cairo-pdf-surface.c:3164: _cairo_pdf_surface_emit_linear_pattern: Assertion `pdf_pattern->gstate_res.id != 0' failed.

Emergency save activated!
Emergency save completed. Inkscape will close now.
If you can reproduce this crash, please file a bug at www.inkscape.org
with a detailed description of the steps leading to the crash, so we can fix it.
Aborted

Backtrace:

✓|13M|[kevin@lpt08a /tmp]$ gdb inkscape
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 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-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/inkscape...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/inkscape
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffe5edd700 (LWP 16493)]
[New Thread 0x7fffe56dc700 (LWP 16494)]
[Thread 0x7fffe56dc700 (LWP 16494) exited]
[New Thread 0x7fffe56dc700 (LWP 16495)]
[Thread 0x7fffe56dc700 (LWP 16495) exited]
inkscape: /tmp/buildd/cairo-1.10.2/src/cairo-pdf-surface.c:3164: _cairo_pdf_surface_emit_linear_pattern: Assertion `pdf_pattern->gstate_res.id != 0' failed.

Program received signal SIGABRT, Aborted.
0x00007fffef473405 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007fffef473405 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007fffef476680 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007fffef46c5b1 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007ffff489d388 in ?? () from /usr/lib/libcairo.so.2
#4 0x00007ffff489d708 in ?? () from /usr/lib/libcairo.so.2
#5 0x00007ffff4857749 in cairo_surface_show_page () from /usr/lib/libcairo.so.2
#6 0x00007ffff483f7c5 in ?? () from /usr/lib/libcairo.so.2
#7 0x00007ffff4857749 in cairo_surface_show_page () from /usr/lib/libcairo.so.2
#8 0x00007ffff482f8a0 in ?? () from /usr/lib/libcairo.so.2
#9 0x00007ffff4826c76 in cairo_show_page () from /usr/lib/libcairo.so.2
#10 0x00000000007fa939 in Inkscape::Extension::Internal::CairoRenderContext::finish() ()
#11 0x00000000007ffb14 in Inkscape::Extension::Internal::CairoRendererPdfOutput::save(Inkscape::Extension::Output*, SPDocument*, char const*) ()
#12 0x00000000007ee01a in Inkscape::Extension::Output::save(SPDocument*, char const*) ()
#13 0x00000000007ecaee in Inkscape::Extension::save(Inkscape::Extension::Extension*, SPDocument*, char const*, bool, bool, bool, Inkscape::Extension::FileSaveMethod) ()
#14 0x00000000006947d7 in ?? ()
#15 0x000000000069429e in sp_file_save_dialog(Gtk::Window&, SPDocument*, Inkscape::Extension::FileSaveMethod) ()
#16 0x0000000000831972 in sp_action_perform(SPAction*, void*) ()
#17 0x00007ffff3ec0e7e in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#18 0x00007ffff3ed28d7 in ?? () from /usr/lib/libgobject-2.0.so.0
#19 0x00007ffff3edbd05 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#20 0x00007ffff3edbed3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#21 0x00007ffff5b7918e in gtk_widget_activate () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#22 0x00007ffff5a745ad in gtk_menu_shell_activate_item () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#23 0x00007ffff5a74947 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#24 0x00007ffff5a61148 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#25 0x00007ffff3ec0e7e in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#26 0x00007ffff3ed26e8 in ?? () from /usr/lib/libgobject-2.0.so.0
#27 0x00007ffff3edbaa5 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#28 0x00007ffff3edbed3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#29 0x00007ffff5b79f91 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#30 0x00007ffff5a5f343 in gtk_propagate_event () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#31 0x00007ffff5a5f6a3 in gtk_main_do_event () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#32 0x00007ffff56cb1dc in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#33 0x00007ffff35f64a3 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#34 0x00007ffff35f6c80 in ?? () from /lib/libglib-2.0.so.0
#35 0x00007ffff35f72f2 in g_main_loop_run () from /lib/libglib-2.0.so.0
#36 0x00007ffff5a5e6f7 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#37 0x00000000006853b0 in sp_main_gui(int, char const**) ()
#38 0x000000000066a868 in main ()

Version: 0.48.1 r9760, the version in debian sid. This also happens with 0.47, the version in squeeze.

Revision history for this message
Kevin van der Vlist (kevin-mm0) wrote :
Revision history for this message
Kevin van der Vlist (kevin-mm0) wrote :
Download full text (4.5 KiB)

... And a backtrace containing the cairo stuff:

(gdb) run
Starting program: /usr/bin/inkscape
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffe5edb700 (LWP 16839)]
[New Thread 0x7fffe56da700 (LWP 16840)]
[Thread 0x7fffe5edb700 (LWP 16839) exited]
[New Thread 0x7fffe5edb700 (LWP 16841)]
[Thread 0x7fffe56da700 (LWP 16840) exited]
inkscape: /tmp/buildd/cairo-1.10.2/src/cairo-pdf-surface.c:3164: _cairo_pdf_surface_emit_linear_pattern: Assertion `pdf_pattern->gstate_res.id != 0' failed.

Program received signal SIGABRT, Aborted.
0x00007fffef471405 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007fffef471405 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007fffef474680 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007fffef46a5b1 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007ffff489762a in _cairo_pdf_surface_emit_linear_pattern (abstract_surface=0x62b9120) at /tmp/buildd/cairo-1.10.2/src/cairo-pdf-surface.c:3164
#4 _cairo_pdf_surface_emit_pattern (abstract_surface=0x62b9120) at /tmp/buildd/cairo-1.10.2/src/cairo-pdf-surface.c:3356
#5 _cairo_pdf_surface_write_patterns_and_smask_groups (abstract_surface=0x62b9120) at /tmp/buildd/cairo-1.10.2/src/cairo-pdf-surface.c:5061
#6 _cairo_pdf_surface_write_page (abstract_surface=0x62b9120) at /tmp/buildd/cairo-1.10.2/src/cairo-pdf-surface.c:5157
#7 _cairo_pdf_surface_show_page (abstract_surface=0x62b9120) at /tmp/buildd/cairo-1.10.2/src/cairo-pdf-surface.c:3582
#8 0x00007ffff4854649 in INT_cairo_surface_show_page (surface=0x62b9120) at /tmp/buildd/cairo-1.10.2/src/cairo-surface.c:2450
#9 0x00007ffff483c9f8 in _cairo_paginated_surface_show_page (abstract_surface=0x62a0380) at /tmp/buildd/cairo-1.10.2/src/cairo-paginated-surface.c:498
#10 0x00007ffff4854649 in INT_cairo_surface_show_page (surface=0x62a0380) at /tmp/buildd/cairo-1.10.2/src/cairo-surface.c:2450
#11 0x00007ffff482e100 in _cairo_gstate_show_page (gstate=0x7ffff4ac6670) at /tmp/buildd/cairo-1.10.2/src/cairo-gstate.c:1363
#12 0x00007ffff4824e99 in cairo_show_page (cr=0x7ffff4ac6640) at /tmp/buildd/cairo-1.10.2/src/cairo.c:2498
#13 0x00000000007fa939 in Inkscape::Extension::Internal::CairoRenderContext::finish() ()
#14 0x00000000007ffb14 in Inkscape::Extension::Internal::CairoRendererPdfOutput::save(Inkscape::Extension::Output*, SPDocument*, char const*) ()
#15 0x00000000007ee01a in Inkscape::Extension::Output::save(SPDocument*, char const*) ()
#16 0x00000000007ecaee in Inkscape::Extension::save(Inkscape::Extension::Extension*, SPDocument*, char const*, bool, bool, bool, Inkscape::Extension::FileSaveMethod) ()
#17 0x00000000006947d7 in ?? ()
#18 0x000000000069429e in sp_file_save_dialog(Gtk::Window&, SPDocument*, Inkscape::Extension::FileSaveMethod) ()
#19 0x0000000000831972 in sp_action_perform(SPAction*, void*) ()
#20 0x00007ffff3ebee7e in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#21 0x00007ffff3ed08d7 in ?? () from /usr/lib/libgobject-2.0.so.0
#22 0x00007ffff3ed9d05 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#23 0x00007ffff3ed9ed3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#24 0x00007ffff5b7918e in gtk_widget_activate () ...

Read more...

Revision history for this message
su_v (suv-lp) wrote :

Reproduced with Inkscape 0.48.2 and 0.48+devel r10696
with cairo 1.10.2, cairo 1.11.2 and a recent cairo build from git master
on Mac OS X 10.5.8 (i386)

Attaching reduced test case: the object which triggers the crash is apparently an imported clip art which originates from CorelDraw (?):

      <g
         id="Layer_x0020_1">
        <metadata
           id="CorelCorpID_0Corel-Layer"
           fill="#000000" />
           (…)

tags: added: cairo crash exporting pdf
Changed in inkscape:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Kevin van der Vlist (kevin-mm0) wrote :

Could be true. The phone icon and the stars of the EU logo are googled, so I wouldn't have to make them myself. I just did a filetype:svg search...

Revision history for this message
Kevin van der Vlist (kevin-mm0) wrote :

Yep, the phone is the culprit. Deleting it makes an export possible. The EU stars are fine.

Revision history for this message
su_v (suv-lp) wrote :

> Yep, the phone is the culprit.

It's the linear gradient on the stroke of the three paths which triggers the crash.

Revision history for this message
jazzynico (jazzynico) wrote :

Also reproduced on Windows XP, Inkscape trunk revision 11866, cairo 1.12.8 (local test).

Changed in inkscape:
status: Confirmed → Triaged
jazzynico (jazzynico)
tags: added: gradient
Revision history for this message
su_v (suv-lp) wrote :

Seems to be fixed upstream (tested on OS X 10.7.5):
- crash reproduced with cairo 1.12.16, Inkscape 0.48.4 r10012 and Inkscape 0.48+devel r13113
- not reproduced with cairo git master @ f88bd92, Inkscape 0.48.4 r10012 and Inkscape 0.48+devel r13113

Revision history for this message
Wong Cho Ching (chwong249664) wrote :

Not reproduced in r13576, linux 64bit, cairo 1.13.0

Beluga (buovjaga)
Changed in inkscape:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.