Crash on save with preview, overwriting file with clone of object with a clip
Requires the open/save dialog to preview the svg
Steps to reproduce:
- Download example_rem.svg
- open Inkscape
- save the document via the save as dialog (ensure preview is enabled)
- overwrite the file you downloaded (ensure you see the preview of the old file)
Minimal file (example_rem.svg)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
id="SVGRoot"
viewBox="0 0 20 20">
<defs>
<clipPath
clipPathUnits="userSpaceOnUse"
id="theclip">
<path
d="m -2,0 h 12 v 12 h -12 z"
id="theregion"/>
</clipPath>
</defs>
<path
d="m 0,0 -2,2 10,10 z"
id="thepath"
clip-path="url(#theclip)"/>
<use
id="theclone"
xlink:href="#thepath"
y="0"
x="0" />
</svg>
What happened?
crash, backtrace attached (truncated version is listed here) inkscape_file_save_overwrite_bt.txt inkscape_file_save_overwrite_bt-full.txt
Thread 1 "inkscape" received signal SIGSEGV, Segmentation fault.
0x00005555597ec360 in ?? ()
(gdb) bt
#0 0x00005555597ec360 in ()
#1 0x00007ffff6be1378 in sp_item_view_list_remove(SPItemView*, SPItemView*) (list=<optimised out>, view=0x55555ceb7750) at ../src/object/sp-item.cpp:1698
#2 0x00007ffff6be9185 in SPItem::release() (this=this@entry=0x55555d624130) at ../src/object/sp-item.cpp:453
#3 0x00007ffff6bedc2c in SPLPEItem::release() (this=this@entry=0x55555d624130) at ../src/object/sp-lpe-item.cpp:91
#4 0x00007ffff6c25374 in SPShape::release() (this=0x55555d624130) at ../src/object/sp-shape.cpp:108
#5 0x00007ffff6c0c9c9 in SPObject::releaseReferences() (this=this@entry=0x55555d624130) at ../src/object/sp-object.cpp:817
#6 0x00007ffff6c0d85b in SPObject::detach(SPObject*) (this=this@entry=0x55555b006fb0, object=0x55555d624130) at ../src/object/sp-object.cpp:572
#7 0x00007ffff6c0f238 in SPObject::release() (this=this@entry=0x55555b006fb0) at ../src/object/sp-object.cpp:626
#8 0x00007ffff6bb05d7 in SPClipPath::release() (this=0x55555b006fb0) at ../src/object/sp-clippath.cpp:65
#9 0x00007ffff6c0c9c9 in SPObject::releaseReferences() (this=this@entry=0x55555b006fb0) at ../src/object/sp-object.cpp:817
#10 0x00007ffff6c0d85b in SPObject::detach(SPObject*) (this=this@entry=0x55555d7d31c0, object=0x55555b006fb0) at ../src/object/sp-object.cpp:572
#11 0x00007ffff6c0f238 in SPObject::release() (this=0x55555d7d31c0) at ../src/object/sp-object.cpp:626
#12 0x00007ffff6bb461f in SPDefs::release() (this=<optimised out>) at ../src/object/sp-defs.cpp:30
#13 0x00007ffff6c0c9c9 in SPObject::releaseReferences() (this=this@entry=0x55555d7d31c0) at ../src/object/sp-object.cpp:817
#14 0x00007ffff6c0d85b in SPObject::detach(SPObject*) (this=this@entry=0x55555d6cb9b0, object=0x55555d7d31c0) at ../src/object/sp-object.cpp:572
#15 0x00007ffff6c0f238 in SPObject::release() (this=this@entry=0x55555d6cb9b0) at ../src/object/sp-object.cpp:626
#16 0x00007ffff6be912f in SPItem::release() (this=this@entry=0x55555d6cb9b0) at ../src/object/sp-item.cpp:442
#17 0x00007ffff6bedc2c in SPLPEItem::release() (this=this@entry=0x55555d6cb9b0) at ../src/object/sp-lpe-item.cpp:91
#18 0x00007ffff6bdd1fb in SPGroup::release() (this=0x55555d6cb9b0) at ../src/object/sp-item-group.cpp:80
#19 0x00007ffff6c1d5ac in SPRoot::release() (this=<optimised out>) at ../src/object/sp-root.cpp:96
#20 0x00007ffff6c0c9c9 in SPObject::releaseReferences() (this=0x55555d6cb9b0) at ../src/object/sp-object.cpp:817
#21 0x00007ffff72000da in SPDocument::~SPDocument() (this=0x555557858400, __in_chrg=<optimised out>) at ../src/document.cpp:174
#22 0x00007ffff72003fb in SPDocument::~SPDocument() (this=0x555557858400, __in_chrg=<optimised out>) at ../src/document.cpp:215
#23 0x00007ffff7024a6a in Inkscape::UI::Dialog::SVGPreview::~SVGPreview() (this=0x555559453d40, __in_chrg=<optimised out>, __vtt_parm=<optimised out>) at ../src/ui/dialog/svg-preview.cpp:454
#24 0x00007ffff6eb5f03 in Inkscape::UI::Dialog::FileDialogBaseGtk::~FileDialogBaseGtk() (__vtt_parm=0x7ffff7c5d408 <VTT for Inkscape::UI::Dialog::FileSaveDialogImplGtk+8>, this=0x555559453ce8, __in_chrg=<optimised out>) at ../src/ui/dialog/filedialogimpl-gtkmm.h:109
without gdb:
Emergency save activated!
Emergency save document locations:
/home/nal/New document 1.2020_01_31_01_22_37.0.svg
Emergency save completed. Inkscape will close now.
If you can reproduce this crash, please file a bug at https://inkscape.org/report
with a detailed description of the steps leading to the crash, so we can fix it.
Gtk-Message: 01:22:37.999: GtkDialog mapped without a transient parent. This is discouraged.
**
ERROR:../src/object/sp-namedview.cpp:1115:SPNamedView* sp_document_namedview(SPDocument*, const gchar*): assertion failed: (nv != nullptr)
Aborted (core dumped)
What should have happened?
No crash.
Inkscape Version and Operating System:
- Replicated (first reported) Inkscape 1.1-dev (97db3eef, 2020-01-29) debug build Linux Mint 19.1
- Replicated Inkscape 1.1-dev (537b768f, 2020-01-04) appimage Linux Mint 19.1
- Replicated Inkscape-2019-10-24-30f930a5 appimage Linux Mint 19.1
- Crash on previewing example.svg Inkscape 1.0beta1 (c0ad965c, 2019-10-10) appimage Linux Mint 19.1
- Not replicated 1.0beta1 (fe3e3069, 2019-09-17) release appimage Linux Mint 19.1
Edited by Nathan Lee