Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Importing SVG images from the filechooser sometimes randomly cause referential-integrity error crash, "invalid-frame" #4888

Closed
nekohayo opened this issue Jul 16, 2024 · 3 comments · Fixed by #5060
Assignees
Milestone

Comments

@nekohayo
Copy link

Steps To Reproduce

  1. Within a fairly large Penpot mockup with a bunch of flex-style board layouts, within a layout, click the toolbar's "Image" button
  2. From the GTK4 / GNOME FileChooser portal provided to Firefox, select a SVG icon (or preferrably, a dozen of them at the same time) that were exported from https://flathub.org/apps/org.gnome.design.IconLibrary
  3. Click OK in the FileChooser to start the upload and import + insertion

Expected behavior

No crash

Actual behavior

Randomly, there may be a crash that forces you to reload. When you reload and try again to do the same thing, it works.

This kinda sounds like it's some sort of race condition going on with the speed at which it inserts the items in the tree?

Screenshots or video

No response

Desktop (please complete the following information)

  • Fedora 39
  • Firefox 128

Smartphone (please complete the following information)

No response

Environment (please complete the following information)

Frontend Stack Trace

Hint:    error on validating file referential integrity
Prof ID: 7f77885c-d0bf-8175-8002-b321408d6e3c
Team ID: 7f77885c-d0bf-8175-8002-b3234d4c9b9d
File ID: 502c5b43-61ea-81d3-8004-9379b61da334

Data:
{:type :validation,
 :code :referential-integrity,
 :hint "error on validating file referential integrity",
 :file-id #uuid "502c5b43-61ea-81d3-8004-9379b61da334",
 :details
 [{:code :invalid-frame,
   :hint "Frame-id should point to parent df636478-3cd2-8017-8004-9888157543ac",
   :shape
   ##object[Function]{:id #uuid "47b1685b-a8fd-8024-8004-aaa4ef31738b",
                      :name "shield-warning-symbolic",
                      :type :group,
                      :x 56,
                      :y 192,
                      :width 16,
                      :height 16,
                      :rotation 0,
                      :selrect ##object[Function]{#, #, #, #, #, #, #, #},
                      :points [# # # #],
                      ...},
   :file-id #uuid "502c5b43-61ea-81d3-8004-9379b61da334",
   :page-id #uuid "502c5b43-61ea-81d3-8004-9379b61da335",
   :shape-id #uuid "47b1685b-a8fd-8024-8004-aaa4ef31738b",
   :args nil}]}

Trace:
d@https://design.penpot.app/plugins-runtime/index.js:3416:42
PENPOT.Dh@https://design.penpot.app/js/shared.ff43d4302.js:3476:38
PENPOT.Eh@https://design.penpot.app/js/shared.ff43d4302.js:3476:355
PENPOT.Fh@https://design.penpot.app/js/shared.ff43d4302.js:3476:308
PENPOT.Vx@https://design.penpot.app/js/shared.ff43d4302.js:4423:110
DQa/<@https://design.penpot.app/js/shared.ff43d4302.js:4397:236
u@https://design.penpot.app/js/shared.ff43d4302.js:242:276
p@https://design.penpot.app/js/shared.ff43d4302.js:242:218
d@https://design.penpot.app/js/shared.ff43d4302.js:149:99
next@https://design.penpot.app/js/shared.ff43d4302.js:158:12
next@https://design.penpot.app/js/shared.ff43d4302.js:220:222
d@https://design.penpot.app/js/shared.ff43d4302.js:149:99
next@https://design.penpot.app/js/shared.ff43d4302.js:158:12
next@https://design.penpot.app/js/shared.ff43d4302.js:242:350
d@https://design.penpot.app/js/shared.ff43d4302.js:149:99
next@https://design.penpot.app/js/shared.ff43d4302.js:158:12
next@https://design.penpot.app/js/shared.ff43d4302.js:220:222
d@https://design.penpot.app/js/shared.ff43d4302.js:149:99
next@https://design.penpot.app/js/shared.ff43d4302.js:158:12
shadow$provide[1]/r/</<@https://design.penpot.app/js/shared.ff43d4302.js:150:383


Last events:
[":app.main.data.workspace.undo/commit-undo-transaction"
 ":app.main.data.workspace.modifiers/apply-modifiers"
 ":app.main.data.workspace.shape-layout/update-layout-positions"
 ":app.main.data.workspace.texts/update-position-data"
 ":app.main.data.workspace.texts/resize-text"
 ":app.main.data.workspace.texts/clean-text-modifier"
 ":app.main.data.workspace.thumbnails/clear-thumbnail"
 ":app.main.data.workspace.shapes/update-shapes"
 ":app.main.data.workspace.texts/commit-position-data"
 ":app.main.data.workspace.undo/start-undo-transaction"
 ":app.main.data.workspace.shapes/update-shapes"
 ":layout/update"
 ":app.main.data.workspace.undo/commit-undo-transaction"
 ":app.main.data.workspace.texts/commit-resize-text"
 ":app.main.data.persistence/update-status"
 ":app.main.data.workspace.shape-layout/update-layout-positions"
 ":app.main.data.workspace.guides/set-hover-guide"
 ":app.main.data.workspace.highlight/highlight-shape"
 ":app.main.data.workspace.highlight/dehighlight-shape"
 ":app.main.data.workspace.highlight/highlight-shape"
 ":app.main.data.workspace.highlight/dehighlight-shape"
 ":app.main.data.workspace.highlight/highlight-shape"
 ":app.main.data.workspace.highlight/dehighlight-shape"
 ":app.main.data.workspace.highlight/highlight-shape"
 ":app.main.data.workspace.highlight/dehighlight-shape"
 ":app.main.data.workspace.highlight/highlight-shape"
 ":app.main.data.workspace.highlight/dehighlight-shape"
 ":app.main.data.workspace.highlight/highlight-shape"
 ":app.main.data.workspace.collapse/expand-all-parents"
 ":app.main.data.workspace.selection/select-shape"
 ":app.main.data.workspace/set-margins-selected"
 ":app.main.data.persistence/persist-commit"
 ":app.main.data.persistence/run-persistence-task"
 ":app.main.data.persistence/update-status"
 ":app.main.data.persistence/append-commit"
 ":app.main.data.workspace.highlight/dehighlight-shape"
 ":app.main.data.workspace.highlight/highlight-shape"
 ":app.main.data.persistence/error"
 ":app.main.data.persistence/update-status"
 ":app.main.data.persistence/discard-persistence-state"
 ":app.main.data.events/event"
 ":app.main.data.workspace.colors/stop-picker"
 ":app.main.data.modal/hide-modal"
 ":app.main.data.messages/hide"
 ":app.main.data.workspace.notifications/finalize"
 ":app.main.data.workspace.shape-layout/finalize"
 ":app.main.data.workspace/finalize-file"
 ":app.main.data.workspace/finalize-page"
 ":app.main.data.shortcuts/pop-shortcuts"
 ":app.main.data.workspace/set-margins-selected"
 ":app.main.data.events/event"]

Backend Stack Trace

No response

Additional context

No response

@nekohayo nekohayo added the bug label Jul 16, 2024
@nekohayo
Copy link
Author

I caught the crash on video (note that at the moment the crash happened, I had not clicked anything, I was just moving the mouse cursor):

Penpot.crash.after.SVG.import.from.FileChooser.webm

@madalenapmelo-kp
Copy link
Contributor

Hi @nekohayo,

Thanks for reporting this! There is already an issue in our backlog to look further into this, I've linked this issue there as well to be considered once we start looking into it, you can find the details here: https://tree.taiga.io/project/penpot/issue/8395

@Alotor Alotor self-assigned this Sep 5, 2024
@Alotor Alotor added this to the 2.2.0 milestone Sep 5, 2024
@Alotor Alotor linked a pull request Sep 5, 2024 that will close this issue
@madalenapmelo-kp
Copy link
Contributor

This issue has been fixed and the fix will be released soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants