Segfault closing dialog after importing PDFs

Bug #1765767 reported by Kevin Locke
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Unassigned

Bug Description

Using inkscape 0.92.3-1 in Debian I am able to reliably produce a crash due to SIGSEGV when closing the Layers dialog using the following procedure:

1. Open Inkscape.
2. Open the Layers dialog (Shift+Ctrl+L or Layer->Layers).
3. Close and re-open Inkscape (to save open Layers dialog in preferences).
4. Open a PDF file (File->Open select .pdf file, press OK, then press OK to default import settings.)
5. Open a second, PDF file with a different name (can be same or different file contents).

    This should open a second window for second PDF, but the second window will have no dialogs open while the first window has two duplicate Layers dialogs open.

6. Close both of the Layers dialog in window for the first PDF file.
7. Switch to the Inkscape window for the second PDF file.

At this point Inkscape will crash with SIGSEGV and the following backtrace:

#0 0x00007ffff5cdbfea in g_type_get_qdata ()
    at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#1 0x00007ffff0574ccb in Glib::wrap_auto(_GObject*, bool) ()
    at /usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1
#2 0x00007ffff1b5292d in Glib::wrap(_GtkWidget*, bool) ()
    at /usr/lib/x86_64-linux-gnu/libgtkmm-2.4.so.1
#3 0x00007ffff7372200 in Inkscape::UI::Widget::DockItem::getWidget() (this=<optimized out>) at ./src/ui/widget/dock-item.cpp:109
#4 0x00007ffff7372fa0 in Inkscape::UI::Widget::DockItem::getWindow() (this=<optimized out>) at ./src/ui/widget/dock-item.cpp:457
#5 0x00007ffff71f1c3a in Inkscape::UI::Dialog::Behavior::DockBehavior::onDesktopActivated(SPDesktop*) (this=0x55555a59fe30, desktop=0x5555564c9800)
    at ./src/ui/dialog/dock-behavior.cpp:248
#6 0x00007ffff74fab38 in sigc::internal::signal_emit1<void, SPDesktop*, sigc::nil>::emit(sigc::internal::signal_impl*, SPDesktop* const&) (_A_a1=@0x7fffffffd5b8: 0x5555564c9800, impl=0x555556fe4ad0)
    at /usr/include/sigc++-2.0/sigc++/signal.h:1045
#7 0x00007ffff74fab38 in sigc::signal1<void, SPDesktop*, sigc::nil>::emit(SPDesktop* const&) const (this=0x55555590fa50, _A_a1=@0x7fffffffd5b8: 0x5555564c9800) at /usr/include/sigc++-2.0/sigc++/signal.h:2955
#8 0x00007ffff74fab38 in Inkscape::Application::activate_desktop(SPDesktop*) (this=0x55555590fa00, desktop=<optimized out>) at ./src/inkscape.cpp:882
#9 0x00007ffff74284b4 in SPDesktopWidget::onFocusInEvent(_GdkEventFocus*) (this=0x555555866410) at ./src/widgets/desktop-widget.cpp:1919
#10 0x00007ffff1b4f24b in () at /usr/lib/x86_64-linux-gnu/libgtkmm-2.4.so.1
#11 0x00007ffff10f62ab in () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#12 0x00007ffff5cb7f6d in g_closure_invoke ()
    at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x00007ffff5cca8d1 in () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#14 0x00007ffff5cd2d8f in g_signal_emit_valist ()
    at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007ffff5cd3e0f in g_signal_emit ()
    at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007ffff120c26c in () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#17 0x00007ffff10f4a23 in gtk_main_do_event ()
    at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#18 0x00007fffefe8504c in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#19 0x00007ffff4a2f287 in g_main_context_dispatch ()
    at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007ffff4a2f4c0 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007ffff4a2f7d2 in g_main_loop_run ()
    at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007ffff10f3977 in gtk_main ()
    at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#23 0x000055555555ce53 in sp_main_gui(int, char const**) (argc=<optimized out>, argv=<optimized out>) at ./src/main.cpp:1164
#24 0x00007fffed7e0a87 in __libc_start_main (main=
    0x55555555a9c0 <main(int, char**)>, argc=1, argv=0x7fffffffe008, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdff8) at ../csu/libc-start.c:310
#25 0x000055555555af2a in _start ()

Note that after step 5 the following messages were printed:

** (inkscape:11143): WARNING **: 19:14:02.898: master 0x555557795d80: unable to add object 0x55555a5abad0[DialogFillStroke] to the hash. There already is an item with that name (0x5555589e15b0).

** (inkscape:11143): WARNING **: 19:14:02.913: master 0x555557795d80: unable to add object 0x55555a5e62d0[DialogLayers] to the hash. There already is an item with that name (0x5555589f8500).

I originally reported this issue in https://bugs.debian.org/895649 and Mattia Rizzolo suggested I report it here.

I am attaching a script which follows the steps described above to reliably reproduce the issue using a temporary home directory to avoid any issues with saved preferences.

If you need any more details or more symbols in the backtrace, let me know.

Thanks,
Kevin

Tags: crash
Revision history for this message
Kevin Locke (kevinoid) wrote :
Revision history for this message
Alvin Penner (apenner) wrote :

- thank you for taking the time to issue a report.
- problem not reproduced on Windows 10, Inkscape 0.92.3 (2405546, 2018-03-11)
- when I open the second pdf file I find that the second Inkscape has a (docked) layers dialog associated with it as expected.
- when I close the layers dialogs I get no crash.

Revision history for this message
Kevin Locke (kevinoid) wrote :

I am unable to reproduce the issue with inkscape 0.92.4-5 in Debian. Marking fixed.

Changed in inkscape:
status: New → Fix Released
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.