Crash opening old inkscape file (convert to legacy Inkscape file) if filename doesn't end in SVG

Steps to reproduce:

Note:

  • Rename file from TEST.SVG to test.svg
  • no crash doing this

Backtrace

inkscape-backtrace-simple-file.txt

Partial:

Thread 1 "inkscape" hit Catchpoint 1 (exception thrown), 0x00007ffff4248d1d in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
...
#5  0x00007ffff4ea64a8 in Glib::ustring::insert(unsigned long, char const*) (this=this@entry=0x7fffffffcb30, i=<optimised out>, src=src@entry=0x7ffff76cf530 "_backup") at ustring.cc:565
#6  0x00007ffff7214a4e in sp_file_save_backup(Glib::ustring) (uri=...) at ../src/file-update.cpp:266
#7  0x00007ffff7216306 in sp_file_convert_dpi(SPDocument*) (doc=doc@entry=0x5555565a9c00) at ../src/file-update.cpp:485
#8  0x00007ffff72fcbfe in InkscapeApplication::document_fix(InkscapeWindow*) (this=this@entry=0x7ffff7dd3548 <ConcreteInkscapeApplication<Gtk::Application>::get_instance()::instance+40>, window=<optimised out>) at ../src/inkscape-application.cpp:332
#9  0x00007ffff72fded4 in InkscapeApplication::window_open(SPDocument*) (this=this@entry=0x7ffff7dd3548 <ConcreteInkscapeApplication<Gtk::Application>::get_instance()::instance+40>, document=<optimised out>, document@entry=0x5555565a9c00) at ../src/inkscape-application.cpp:387

Inkscape Version and Operating System:

  • Inkscape 1.0beta2 (2b71d25d, 2019-12-03) appimage, Linux Mint 19.1
  • Inkscape 1.1-dev (53a8040e, 2020-04-05) debug build Linux Mint 19.1