crash ungrouping when path has a malformed lpe (i.e. no original-d)

Steps to reproduce:

  1. Open tux.svg (from https://github.com/garrett/Tux) in Inkscape
  2. Select all
  3. Ungroup

Steps to recreate minimal file

  1. Open Inkscape
  2. Go to the Pen tool, select Spiro mode
  3. Draw a path
  4. Close inkscape and remove the original-d attribute from the path. (if in 0.92.4, this can be done in the xml editor)
  5. Ungrouping this path in master causes a crash.

What happened?

Inkscape crashed with an unspecific error message: "Inkscape encountered an internal error and will close now."

From the command line, I saw a bunch of this particular message:

** (org.inkscape.Inkscape:2): CRITICAL **: 15:48:39.908: void SPObject::requestModified(unsigned int): assertion 'this->document != nullptr' failed

and after Emergency save activated!, I saw a few:

(org.inkscape.Inkscape:2): Gtk-CRITICAL **: 15:48:39.981: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GdlSwitcher

What should have happened?

Inkscape shouldn't have crashed when editing an SVG document.

Inkscape Version and Operating System:

  • Inkscape Version: Inkscape 1.0 (4035a4fb, 2020-05-01) Pango version: 1.44.7
  • Flatpak: Yes, from Flathub
  • Operating System: Fedora
  • Operating System version: 32

Additional notes

Thankfully, we have a branch with an updated Tux SVG where the crash doesn't happen... but it has yet to be merged. (It will be done soon.) I did make the original SVG in Inkscape, but we did edit it a bit outside of Inkscape. 😉

Also: Huge congrats on the 1.0 release! 🎉

Edited by Nathan Lee