Inkscape crash after Undo

Summary:

Inkscape crashes at an Undo operation after creating a 3D object.

Steps to reproduce:

  • open Inkscape
  • create new document or open an existing document
  • select Tool "Create 3D Boxes (X)"
  • create a 3D box
  • Click the Undo button.

What happened?

Inkscape gave an error message about encountering an internal error, tries to save the document, and quits when you hit OK.

What should have happened?

The operation should have been undone, and Inkscape should have continued. Sample attachments:

Version info

Inkscape 1.2-rc (7411eed, 2022-05-14)

    GLib version:     2.70.5
    GTK version:      3.24.33
    glibmm version:   2.60.0
    gtkmm version:    3.24.5
    libxml2 version:  2.9.12
    libxslt version:  1.1.34
    Cairo version:    1.17.6
    Pango version:    1.50.6
    HarfBuzz version: 2.9.1

    OS version:       macOS

inkscape_2022-05-16-170353-2_Cochabamba.crash