Crash after "object to path" on a clone and shape

Summary:

Instant crash after attempting to apply "object to path" to a cloned object and a shape.

Steps to reproduce:

  • open Inkscape
  • draw ellipse
  • clone it and move it
  • draw rectangle intersecting cloned ellipse
  • select both clone and rectangle
  • select "object to path"

What happened?

Crash.

What should have happened?

No crash, clone left alone, rectangle shape turned into a path. ...

Sample attachments:

Version info

Inkscape 1.3-dev (3bda5c81a0, 2023-03-01, custom)

GLib version:     2.74.3
GTK version:      3.24.36
glibmm version:   2.66.5
gtkmm version:    3.24.7
libxml2 version:  2.9.13
libxslt version:  1.1.37
Cairo version:    1.16.0
Pango version:    1.50.12
HarfBuzz version: 5.3.1

OS version:       macOS
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xa0)
  * frame #0: 0x000000010202d69c libinkscape_base.1.3.0.0.dylib`SPDocument::doc2dt() const
    frame #1: 0x0000000101a385c0 libinkscape_base.1.3.0.0.dylib`SPItem::i2dt_affine() const + 180
    frame #2: 0x0000000102012cdc libinkscape_base.1.3.0.0.dylib`objects_query_strokewidth(std::__1::vector<SPItem*, std::__1::allocator<SPItem*> > const&, SPStyle*) + 156
    frame #3: 0x0000000102015544 libinkscape_base.1.3.0.0.dylib`sp_desktop_query_style(SPDesktop*, SPStyle*, int) + 384
    frame #4: 0x0000000101f8fcbc libinkscape_base.1.3.0.0.dylib`Inkscape::UI::Widget::SelectedStyle::update() + 2500
    frame #5: 0x0000000102062184 libinkscape_base.1.3.0.0.dylib`sigc::internal::signal_emit1<void, Inkscape::Selection*, sigc::nil>::emit(sigc::internal::signal_impl*, Inkscape::Selection* const&) + 208
    frame #6: 0x00000001020a4354 libinkscape_base.1.3.0.0.dylib`Inkscape::Selection::_emitChanged(bool) + 480
    frame #7: 0x0000000102078564 libinkscape_base.1.3.0.0.dylib`Inkscape::ObjectSet::toCurves(bool, bool) + 812
    frame #8: 0x000000010213ace0 libinkscape_base.1.3.0.0.dylib`object_to_path(InkscapeApplication*) + 128

It appears we create an item with no ID and no document. This is probably wrong.