(desktop tracking) Crash undoing style changes after closing Selectors & CSS dialog
First reported in #1156
Steps to reproduce:
- Open Inkscape
- Open test_class_style_single.svg
- Open Selects and CSS dialog (Ctrl+Shift+Q)
- Change fill to red
- Close dialog
- Undo multiple times
What happened?
Crash
Backtrace: inkscape-backtrace-desktop-tracking-selectors-dialog.txt
Backtrace (truncated):
Thread 1 "inkscape" received signal SIGSEGV, Segmentation fault.
SPDesktop::getSelection (this=0x0) at ../src/desktop.cpp:426
426 return selection;
(gdb) bt
#0 0x00007ffff71de23e in SPDesktop::getSelection() const (this=0x0) at ../src/desktop.cpp:426
#1 0x00007ffff6fee1e2 in Inkscape::UI::Dialog::StyleDialog::readStyleElement() (this=0x555557791c00) at ../src/ui/dialog/styledialog.cpp:459
#2 0x00007ffff6ff49bf in Inkscape::UI::Dialog::StyleDialog::NodeObserver::notifyContentChanged(Inkscape::XML::Node&, Inkscape::Util::ptr_shared, Inkscape::Util::ptr_shared) (this=0x55555807eb70) at ../src/ui/dialog/styledialog.cpp:83
#3 0x00007ffff71a996c in Inkscape::XML::CompositeNodeObserver::notifyContentChanged(Inkscape::XML::Node&, Inkscape::Util::ptr_shared, Inkscape::Util::ptr_shared) (this=this@entry=0x5555565ecb58, node=..., old_content=..., old_content@entry=..., new_content=...) at ../src/xml/composite-node-observer.cpp:84
#4 0x00007ffff71bd32d in Inkscape::XML::SimpleNode::setContent(char const*) (this=0x5555565ecb00, content=<optimised out>) at ../src/xml/simple-node.cpp:316
#5 0x00007ffff71aa2fc in (anonymous namespace)::LogPerformer::notifyContentChanged((anonymous namespace)::LogPerformer::Node&, Inkscape::Util::ptr_shared, Inkscape::Util::ptr_shared) (this=<optimised out>, node=..., new_value=...) at ../src/xml/event.cpp:121
#6 0x00007ffff71aa39d in Inkscape::XML::EventChgContent::_undoOne(Inkscape::XML::NodeObserver&) const (this=<optimised out>, observer=...) at ../src/xml/event.cpp:179
What should have happened?
No crash (also no undo transaction error)
Inkscape Version and Operating System:
- Inkscape 1.1-dev (0b728ebf, 2020-03-15) debug build Linux Mint 19.1
- Inkscape 1.1-dev (12e2a095, 2020-02-19) Windows 10 version: 10.0.18362 (from original issue)
- Inkscape 1.1-dev (ba1f9147, 2020-02-12) appimage Linux Mint 19.1
- Not occurring in Inkscape 1.1-dev (b70353ca, 2020-02-11) appimage Linux Mint 19.1
- Not occurring in Inkscape 1.0beta2 (f48760d6, 2020-03-16) appimage Linux Mint 19.1
Edited by Nathan Lee