Segfault when importing from Open Clip Art Library

Bug #1246582 reported by Vasil Velichkov on 2013-10-31
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Undecided
Unassigned
Debian
New
Unknown

Bug Description

Here are the steps that I used to reproduce the bug on my machine. (Debian Wheezy inkscape 0.48.3.1-1.3 amd64)

* Click menu “File” --> “Import from Open Clip Art”
* Type "Tubo de Ensaio"
* Click Search
* Select the fist or second item in the list

X dialog appears: “Inkscape encountered an internal error and will close
now"

The console output:

 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.
 Segmentation fault (core dumped)

First I report this bug in Debian BTS http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=728354
The attached patch contains a fix.

And here is the backtrace:

$ gdb inkscape core
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 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...done.
[New LWP 16264]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `inkscape'.
Program terminated with signal 11, Segmentation fault.
#0 __strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp.S:260
260 ../sysdeps/x86_64/multiarch/strcmp.S: No such file or directory.
(gdb) bt
#0 __strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp.S:260
#1 0x00000000014269d2 in cr_rgb_set_from_name (a_this=0x7fff53355ad0, a_color_name=0x7db9a20 "none") at libcroco/cr-rgb.c:422
#2 0x00007fad31950aff in rsvg_css_parse_color (str=<optimized out>, inherit=0x7db97e4) at rsvg-css.c:380
#3 0x00007fad319683a0 in rsvg_parse_style_pair (important=0, value=0x7db9a20 "none", name=0x7db9980 "stop-color", state=0x7db9640, ctx=0x6213450)
    at rsvg-styles.c:756
#4 rsvg_parse_style_pair (ctx=0x6213450, state=0x7db9640, name=0x7db9980 "stop-color", value=0x7db9a20 "none", important=0) at rsvg-styles.c:463
#5 0x00007fad31969780 in rsvg_parse_style (ctx=0x6213450, state=0x7db9640, str=<optimized out>) at rsvg-styles.c:972
#6 0x00007fad31952734 in rsvg_stop_set_atts (self=0x7db95e0, ctx=0x6213450, atts=0x6b948c0) at rsvg-paint-server.c:206
#7 0x00007fad3196c052 in rsvg_node_set_atts (atts=0x6b948c0, ctx=0x6213450, node=0x7db95e0) at rsvg-base.c:1952
#8 rsvg_standard_element_start (ctx=0x6213450, name=<optimized out>, atts=0x6b948c0) at rsvg-base.c:283
#9 0x00007fad3196f548 in rsvg_start_element (data=0x6213450, name=<optimized out>, atts=<optimized out>) at rsvg-base.c:647
#10 0x00007fad46eec668 in xmlParseStartTag__internal_alias (ctxt=ctxt@entry=0x7d6e450) at ../../parser.c:8411
#11 0x00007fad46ef4ff0 in xmlParseTryOrFinish (ctxt=ctxt@entry=0x7d6e450, terminate=terminate@entry=0) at ../../parser.c:11120
#12 0x00007fad46ef5d61 in xmlParseChunk__internal_alias (ctxt=0x7d6e450,
    chunk=0x7fff53356160 "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!-- Created with Inkscape (http://www.inkscape.org/) -->\n<svg xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://web.resource.org/cc/\""..., size=28252, terminate=0) at ../../parser.c:11897
#13 0x00007fad3196ecef in rsvg_handle_write_impl (error=0x7fff533671f8, count=28252,
    buf=0x7fff53356160 "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!-- Created with Inkscape (http://www.inkscape.org/) -->\n<svg xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://web.resource.org/cc/\""..., handle=0x6213450) at rsvg-base.c:1121
#14 rsvg_handle_write (handle=0x6213450,
    buf=0x7fff53356160 "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!-- Created with Inkscape (http://www.inkscape.org/) -->\n<svg xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://web.resource.org/cc/\""..., count=28252, error=0x7fff533671f8) at rsvg-base.c:1680
#15 0x00007fad31b7dd51 in gdk_pixbuf__svg_image_load_increment (data=0x7ce5820,
    buf=0x7fff53356160 "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!-- Created with Inkscape (http://www.inkscape.org/) -->\n<svg xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://web.resource.org/cc/\""..., size=28252, error=0x7fff533671f8) at io-svg.c:135
#16 0x00007fad43df2394 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
#17 0x00007fad43df25ac in gdk_pixbuf_new_from_file () from /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
#18 0x00007fad46332a21 in Gdk::Pixbuf::create_from_file(std::string const&) () from /usr/lib/libgdkmm-2.4.so.1
#19 0x000000000104f18b in Inkscape::UI::Dialog::SVGPreview::showImage (this=0x7219740, theFileName=...) at ui/dialog/filedialogimpl-gtkmm.cpp:211
#20 0x0000000001128bbb in Inkscape::UI::Dialog::FileListViewText::on_cursor_changed (this=0x708cf50) at ui/dialog/ocaldialogs.cpp:377
#21 0x00007fad46ada610 in Gtk::TreeView_Class::cursor_changed_callback(_GtkTreeView*) () from /usr/lib/libgtkmm-2.4.so.1
#22 0x00007fad4318d6e0 in g_closure_invoke (closure=0x26ddc90, return_value=0x0, n_param_values=1, param_values=0x7fff533696c0,
    invocation_hint=0x7fff53369660) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gclosure.c:777
#23 0x00007fad4319e4d0 in signal_emit_unlocked_R (node=node@entry=0x26ddce0, detail=detail@entry=0, instance=instance@entry=0x6254bb0,
---Type <return> to continue, or q <return> to quit---
    emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fff533696c0)
    at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3589
#24 0x00007fad431a66bc in g_signal_emit_valist (instance=0x6254bb0, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fff53369908)
    at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3300
#25 0x00007fad431a6852 in g_signal_emit (instance=instance@entry=0x6254bb0, signal_id=<optimized out>, detail=detail@entry=0)
    at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3356
#26 0x00007fad44ea2e07 in gtk_tree_view_real_set_cursor (tree_view=tree_view@entry=0x6254bb0, path=path@entry=0x7ab8380,
    clear_and_select=clear_and_select@entry=1, clamp_node=1) at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtktreeview.c:12616
#27 0x00007fad44ea6a10 in gtk_tree_view_button_press (widget=0x6254bb0, event=0x6a5c950) at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtktreeview.c:2797
#28 0x00007fad46ae31a7 in Gtk::Widget::on_button_press_event(_GdkEventButton*) () from /usr/lib/libgtkmm-2.4.so.1
#29 0x00007fad46ae5fc3 in Gtk::Widget_Class::button_press_event_callback(_GtkWidget*, _GdkEventButton*) () from /usr/lib/libgtkmm-2.4.so.1
#30 0x00007fad44da8099 in _gtk_marshal_BOOLEAN__BOXED (closure=0x26c7a60, return_value=0x7fff53369cd0, n_param_values=<optimized out>,
    param_values=0x7fff53369d80, invocation_hint=<optimized out>, marshal_data=<optimized out>) at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkmarshalers.c:86
#31 0x00007fad4318d6e0 in g_closure_invoke (closure=0x26c7a60, return_value=0x7fff53369cd0, n_param_values=2, param_values=0x7fff53369d80,
    invocation_hint=0x7fff53369d20) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gclosure.c:777
#32 0x00007fad4319e4d0 in signal_emit_unlocked_R (node=node@entry=0x26c7a90, detail=detail@entry=0, instance=instance@entry=0x6254bb0,
    emission_return=emission_return@entry=0x7fff53369e50, instance_and_params=instance_and_params@entry=0x7fff53369d80)
    at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3589
#33 0x00007fad431a62db in g_signal_emit_valist (instance=0x6254bb0, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fff53369fd8)
    at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3310
#34 0x00007fad431a6852 in g_signal_emit (instance=instance@entry=0x6254bb0, signal_id=<optimized out>, detail=detail@entry=0)
    at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3356
#35 0x00007fad44ebf93e in gtk_widget_event_internal (widget=widget@entry=0x6254bb0, event=event@entry=0x6a5c950)
    at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkwidget.c:4984
#36 0x00007fad44ebfcb9 in IA__gtk_widget_event (widget=widget@entry=0x6254bb0, event=event@entry=0x6a5c950)
    at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkwidget.c:4781
#37 0x00007fad44da6434 in IA__gtk_propagate_event (widget=0x6254bb0, event=0x6a5c950) at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkmain.c:2489
#38 0x00007fad44da678b in IA__gtk_main_do_event (event=0x6a5c950) at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkmain.c:1684
#39 0x0000000000c271e9 in snooper (event=0x6a5c950) at main.cpp:912
#40 0x00007fad44a137ac in gdk_event_dispatch (source=source@entry=0x26ae670, callback=<optimized out>, user_data=<optimized out>)
    at /tmp/buildd/gtk+2.0-2.24.10/gdk/x11/gdkevents-x11.c:2377
#41 0x00007fad42ac4355 in g_main_dispatch (context=0x26ae760) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./glib/gmain.c:2539
#42 g_main_context_dispatch (context=context@entry=0x26ae760) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./glib/gmain.c:3075
#43 0x00007fad42ac4688 in g_main_context_iterate (context=0x26ae760, block=block@entry=1, dispatch=dispatch@entry=1,
---Type <return> to continue, or q <return> to quit---
    self=<error reading variable: Unhandled dwarf expression opcode 0xfa>) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./glib/gmain.c:3146
#44 0x00007fad42ac4a82 in g_main_loop_run (loop=0x708e170) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./glib/gmain.c:3340
#45 0x00007fad44d2dc02 in IA__gtk_dialog_run (dialog=0x79a3050) at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkdialog.c:1094
#46 0x000000000112b597 in Inkscape::UI::Dialog::FileImportFromOCALDialog::show (this=0x7587780) at ui/dialog/ocaldialogs.cpp:649
#47 0x0000000000c435b5 in sp_file_import_from_ocal (parentWindow=...) at file.cpp:1497
#48 0x0000000000d83a84 in Inkscape::FileVerb::perform (action=0x3088a80, data=0xd) at verbs.cpp:834
#49 0x0000000000ebac29 in sp_action_perform (action=0x3088a80, data=0x0) at helper/action.cpp:181
#50 0x0000000000c5e6b8 in sp_ui_menu_activate (action=0x3088a80) at interface.cpp:369
#51 0x00007fad4318d6e0 in g_closure_invoke (closure=0x439dc10, return_value=0x0, n_param_values=1, param_values=0x7fff5336a650,
    invocation_hint=0x7fff5336a5f0) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gclosure.c:777
#52 0x00007fad4319e750 in signal_emit_unlocked_R (node=node@entry=0x26d6a20, detail=detail@entry=0, instance=instance@entry=0x439b610,
    emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fff5336a650)
    at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3551
#53 0x00007fad431a66bc in g_signal_emit_valist (instance=0x439b610, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fff5336a898)
    at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3300
#54 0x00007fad431a6852 in g_signal_emit (instance=instance@entry=0x439b610, signal_id=<optimized out>, detail=detail@entry=0)
    at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3356
#55 0x00007fad44ebeb6c in IA__gtk_widget_activate (widget=widget@entry=0x439b610) at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkwidget.c:5015
#56 0x00007fad44dbadbd in IA__gtk_menu_shell_activate_item (menu_shell=0x37fcc50, menu_item=0x439b610, force_deactivate=<optimized out>)
    at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkmenushell.c:1256
#57 0x00007fad44dbb15c in gtk_menu_shell_button_release (widget=0x37fcc50, event=<optimized out>)
    at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkmenushell.c:683
#58 0x00007fad44da8099 in _gtk_marshal_BOOLEAN__BOXED (closure=0x26c79b0, return_value=0x7fff5336ab80, n_param_values=<optimized out>,
    param_values=0x7fff5336ac30, invocation_hint=<optimized out>, marshal_data=<optimized out>) at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkmarshalers.c:86
#59 0x00007fad4318d6e0 in g_closure_invoke (closure=0x26c79b0, return_value=0x7fff5336ab80, n_param_values=2, param_values=0x7fff5336ac30,
    invocation_hint=0x7fff5336abd0) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gclosure.c:777
#60 0x00007fad4319e4d0 in signal_emit_unlocked_R (node=node@entry=0x26c7c20, detail=detail@entry=0, instance=instance@entry=0x37fcc50,
    emission_return=emission_return@entry=0x7fff5336ad00, instance_and_params=instance_and_params@entry=0x7fff5336ac30)
    at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3589
#61 0x00007fad431a62db in g_signal_emit_valist (instance=0x37fcc50, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fff5336ae88)
    at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3310
#62 0x00007fad431a6852 in g_signal_emit (instance=instance@entry=0x37fcc50, signal_id=<optimized out>, detail=detail@entry=0)
    at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3356
#63 0x00007fad44ebf93e in gtk_widget_event_internal (widget=widget@entry=0x37fcc50, event=event@entry=0x6a5c6e0)
---Type <return> to continue, or q <return> to quit---
    at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkwidget.c:4984
#64 0x00007fad44ebfcb9 in IA__gtk_widget_event (widget=widget@entry=0x37fcc50, event=event@entry=0x6a5c6e0)
    at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkwidget.c:4781
#65 0x00007fad44da6434 in IA__gtk_propagate_event (widget=0x37fcc50, event=0x6a5c6e0) at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkmain.c:2489
#66 0x00007fad44da678b in IA__gtk_main_do_event (event=0x6a5c6e0) at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkmain.c:1684
#67 0x0000000000c271e9 in snooper (event=0x6a5c6e0) at main.cpp:912
#68 0x00007fad44a137ac in gdk_event_dispatch (source=source@entry=0x26ae670, callback=<optimized out>, user_data=<optimized out>)
    at /tmp/buildd/gtk+2.0-2.24.10/gdk/x11/gdkevents-x11.c:2377
#69 0x00007fad42ac4355 in g_main_dispatch (context=0x26ae760) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./glib/gmain.c:2539
#70 g_main_context_dispatch (context=context@entry=0x26ae760) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./glib/gmain.c:3075
#71 0x00007fad42ac4688 in g_main_context_iterate (context=0x26ae760, block=block@entry=1, dispatch=dispatch@entry=1,
    self=<error reading variable: Unhandled dwarf expression opcode 0xfa>) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./glib/gmain.c:3146
#72 0x00007fad42ac4a82 in g_main_loop_run (loop=0x37ccd40) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./glib/gmain.c:3340
#73 0x00007fad44da5797 in IA__gtk_main () at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkmain.c:1256
#74 0x0000000000c276c3 in sp_main_gui (argc=1, argv=0x7fff5336b488) at main.cpp:978
#75 0x0000000000d92c0e in Inkscape::NSApplication::Application::run (this=0x7fff5336b350) at application/application.cpp:114
#76 0x0000000000c26c0b in main (argc=1, argv=0x7fff5336b488) at main.cpp:714
(gdb)

Changed in debian:
status: Unknown → New
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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