[Crash Report] Crash on undo Boolean operation
Describe the Crash Crash on hit Ctrl-Z on the web editor, after a boolean operation between two shapes.
Steps To Reproduce Describe precisely how the crash occurred, step by step, starting with a new editor window.
- Open the Graphite Editor at https://editor.graphite.rs
- Create two overlapping rectangles
- Select the Select Tool
- Select both rectangles with Maj+mouse
- Click on "Boolean Substract From"
- Hit Ctrl-Z => Crash
Additional Details Also happens with:
- other shapes
- other boolean operations
- using the menu button to undo
Browser and OS Firefox 100, Windows 10 (also reproduced on Chromium)
Stack Trace Copied from the crash dialog in the Graphite Editor:
panicked at 'already borrowed: BorrowMutError', frontend/wasm/src/api.rs:57:18
824/ce/<@https://editor.graphite.rs/js/app.62fab509.js:1:5409
n@https://editor.graphite.rs/js/app.62fab509.js:21:1608
824/be/n<@https://editor.graphite.rs/js/app.62fab509.js:21:2501
738/</M_/<@https://editor.graphite.rs/js/123.0232cf3d.js:1:17089
Y@https://editor.graphite.rs/js/123.0232cf3d.js:1:6423
M_@https://editor.graphite.rs/js/123.0232cf3d.js:1:17055
@https://editor.graphite.rs/b248fb68caee4a9b.module.wasm:wasm-function[2075]:0x181786
@https://editor.graphite.rs/b248fb68caee4a9b.module.wasm:wasm-function[800]:0x1351cd
@https://editor.graphite.rs/b248fb68caee4a9b.module.wasm:wasm-function[725]:0x12c458
@https://editor.graphite.rs/b248fb68caee4a9b.module.wasm:wasm-function[906]:0x140b19
@https://editor.graphite.rs/b248fb68caee4a9b.module.wasm:wasm-function[2615]:0x186364
@https://editor.graphite.rs/b248fb68caee4a9b.module.wasm:wasm-function[1481]:0x16ca37
@https://editor.graphite.rs/b248fb68caee4a9b.module.wasm:wasm-function[1755]:0x1791d9
@https://editor.graphite.rs/b248fb68caee4a9b.module.wasm:wasm-function[2185]:0x18374d
@https://editor.graphite.rs/b248fb68caee4a9b.module.wasm:wasm-function[2191]:0x1838a5
@https://editor.graphite.rs/b248fb68caee4a9b.module.wasm:wasm-function[1822]:0x17b3c4
@https://editor.graphite.rs/b248fb68caee4a9b.module.wasm:wasm-function[982]:0x1481f7
@https://editor.graphite.rs/b248fb68caee4a9b.module.wasm:wasm-function[781]:0x132ee0
@https://editor.graphite.rs/b248fb68caee4a9b.module.wasm:wasm-function[1280]:0x16070b
on_mouse_move@https://editor.graphite.rs/js/123.0232cf3d.js:1:9948
824/ve/get/<@https://editor.graphite.rs/js/app.62fab509.js:21:2205
u@https://editor.graphite.rs/js/app.62fab509.js:21:7045
action@https://editor.graphite.rs/js/app.62fab509.js:21:5560
@caleb-ad could you please try and fix this?
I wasn't able to reproduce this bug. Is the method that the shapes are selected with important? I tried on both https://editor.graphite.rs/ and a freshly compiled local server. Is it possible this issue was fixed in recent changes?
I was able to reproduce it by repeatedly clicking the Boolean Subtract Front button and CtrlZ and after a few times it crashes. Does that work for you @caleb-ad ?
@Keavon Is the panic from
'called
Result::unwrap()on anErrvalue: LayerNotFound([])', editor/src/document/transformation.rs:201:80
If so this is due to the selection not correctly updating when abort is called on reverting a transaction.