Selectors dialog keeps objects from closed documents (crash on click)

Steps to reproduce:

  • Open inkscape
  • Open Selectors dialog
  • Create rectangle
  • Add a new selector (e.g. #rect12)
  • Deselect the rectangle (not necessary)
  • Close the document
  • See selectors from old document remain
  • Click on old selector
  • Crash

Note: selectors dialog still usable if you don't select the old selectors

What happened?

Backtrace in 1.0beta (full backtrace attached selectors_backtrace.txt)

Thread 1 "inkscape" received signal SIGSEGV, Segmentation fault.
0x00007ffff4290ebf in std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) set pagination off
(gdb) bt
#0  0x00007ffff4290ebf in std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*) () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x00007fffef0006c8 in sigc::internal::signal_impl::insert(std::_List_iterator<sigc::slot_base>, sigc::slot_base&&) () at /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0
#2  0x00007ffff6bcfb3b in sigc::signal1<void, SPObject*, sigc::nil>::connect(sigc::slot<void (SPObject*), sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>&&) (slot_=..., this=0x555558d29118) at /usr/include/sigc++-2.0/sigc++/signal.h:2942
#3  0x00007ffff6bcfb3b in SPObject::connectRelease(sigc::slot<void, SPObject*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>) (slot=..., this=0x555558d290a0) at ../src/object/sp-object.h:261
#4  0x00007ffff6bcfb3b in Inkscape::ObjectSet::_add(SPObject*) (this=this@entry=0x5555565eee18, object=<optimised out>, object@entry=0x555558d290a0) at ../src/object/object-set.cpp:121
#5  0x00007ffff6bd1a5b in Inkscape::ObjectSet::add(SPObject*, bool) (this=0x5555565eee18, object=0x555558d290a0, nosignal=nosignal@entry=false) at ../src/object/object-set.cpp:40
#6  0x00007ffff7007644 in Inkscape::UI::Dialog::SelectorsDialog::_selectObjects(int, int) (this=this@entry=0x555558dede80, eventX=<optimised out>, eventY=<optimised out>) at ../src/ui/dialog/selectorsdialog.cpp:1135
#7  0x00007ffff7007752 in Inkscape::UI::Dialog::SelectorsDialog::_buttonEventsSelectObjs(_GdkEventButton*) (this=0x555558dede80, event=0x555558c00970) at ../src/ui/dialog/selectorsdialog.cpp:1435
#8  0x00007ffff7012bbd in sigc::bound_mem_functor1<void, Inkscape::UI::Dialog::SelectorsDialog, _GdkEventButton*>::operator()(_GdkEventButton* const&) const (_A_a1=<optimised out>, this=<optimised out>) at /usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:2066
... unrelated stuff...

What should have happened?

Selectors removed on document close

Inkscape Version and Operating System:

  • Inkscape 1.0beta1 (ebe98834, 2019-09-21) debug build Linux Mint 19.1
  • Inkscape 1.0alpha2 (5a123956, 2019-09-07) appimage Linux Mint 19.1