Inkscape hangs processing icc files after mistaken Ctrl+U

Summary:

I opened a PDF using "Poppler/Cairo import", added text and an image to it and saved as SVG. Later I opened the SVG file and tried to edit the PDF contents. I mistakenly pressed Ctrl+U to ungroup its objects (I believe Ctrl+U in Inkscape triggers Unicode entry although it also sometimes ungroups), then clicked around, pressed Ctrl+U several times. Then I realized Inkscape wasn't responding, my laptop fans came on, eventually Inkscape crashed.

Steps to reproduce:

I couldn't reproduce with an empty SVG or a simple one containing one object. But I pulled a page out of a catalog PDF, and opened it/saved it/fiddled around per the steps above, and reproduced the hang.

  • open text PDF using "Poppler/Cairo import" mode
  • save as SVG, quit Inkscape
  • open Inkscape with the SVG (try with Catalog page svg)
  • click on text, press Ctrl+U, click in the side panel, press Ctrl+U, type, click the Object Properties in the side panel... I'm sorry I can't be more specific.

What happened?

Inkscape goes unresponsive.

I ran strace. It seems to be busy endlessly doing newfstatat()/openat() of directories and files in the flatpak's /app/share/color/iccsubdirectory tree. I sorted lines and counted to get, e.g.

  • 36,478 calls to newfstatat(12, "", {st_mode=S_IFREG|0644, st_size=9080, ...}, AT_EMPTY_PATH) = 0 (many .icc files are 9,080 bytes in size).
  • 2,489 calls to newfstatat(AT_FDCWD, "/app/share/color/icc/calligra/ACEScg-elle-V2-g10.icc", {st_mode=S_IFREG|0644, st_size=880, ...}, 0) = 0
  • 2,487 calls to openat(AT_FDCWD, "/app/share/color/icc/colord/sRGB.icc", O_RDONLY) = 12

etc.

What should have happened?

Inkscape shouldn't hang.

Sample attachments:

the last few cycles of strace output while Inkscape unresponsive, until I pressed Ctrl-C

Version info

Inkscape 1.1.2 (0a00cf5339, 2022-02-04)

    GLib version:     2.70.4
    GTK version:      3.24.31
    glibmm version:   2.66.1
    gtkmm version:    3.24.5
    libxml2 version:  2.9.12
    libxslt version:  1.1.34
    Cairo version:    1.16.0
    Pango version:    1.48.11
    HarfBuzz version: 3.0.0
    Poppler version:  21.09.0

    OS version:       GNOME 41 (Flatpak runtime)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information