Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

[Crash Report] Crash on undo Boolean operation

Open Drestin opened this issue 3 years ago • 4 comments

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.

  1. Open the Graphite Editor at https://editor.graphite.rs
  2. Create two overlapping rectangles
  3. Select the Select Tool
  4. Select both rectangles with Maj+mouse
  5. Click on "Boolean Substract From"
  6. 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

Drestin avatar May 17 '22 11:05 Drestin

@caleb-ad could you please try and fix this?

Keavon avatar May 19 '22 19:05 Keavon

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?

caleb-ad avatar May 20 '22 02:05 caleb-ad

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 avatar May 20 '22 04:05 Keavon

@Keavon Is the panic from

'called Result::unwrap() on an Err value: 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.

0HyperCube avatar May 21 '22 10:05 0HyperCube