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

[Crash Report] In Node Graph view #2476

Open
qxzcode opened this issue Mar 24, 2025 · 1 comment
Open

[Crash Report] In Node Graph view #2476

qxzcode opened this issue Mar 24, 2025 · 1 comment
Labels
Crash A panic which crashed the editor Good First Issue Good for newcomers

Comments

@qxzcode
Copy link

qxzcode commented Mar 24, 2025

Describe the Crash
Not sure exactly what happened; I was just clicking around on https://editor.graphite.rs.

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. ... Unfortunately I don't remember exactly what I did; I'm totally new to Graphite so I didn't really know what I was doing.
  3. I was clicking around in the Node Graph, and I dragged the output of one node to create a new "Opacity" node.
  4. I changed the opacity value.
  5. I dragged the output of the Opacity node to one of the (output?) slots on the right (?)
  6. I was clicking around those "output slots" when it crashed. It might have crashed when I clicked the "-" button on one to delete it.

Additional Details

Here's the state I ended up in:

Image

If I hide the crash dialog with the browser devtools, here's what's underneath:

Image

Browser and OS
Chrome 134, Unix

Stack Trace
Copied from the crash dialog in the Graphite editor:

panicked at editor/src/messages/portfolio/document/utility_types/network_interface.rs:3480:70:
removal index (is 1) should be < len (is 1)

Error
    at https://editor.graphite.rs/assets/index-DW7tnTXP.js:922:1178
    at g (https://editor.graphite.rs/assets/index-DW7tnTXP.js:908:63371)
    at Object.handleJsMessage (https://editor.graphite.rs/assets/index-DW7tnTXP.js:908:63519)
    at https://editor.graphite.rs/assets/index-DW7tnTXP.js:908:63912
    at https://editor.graphite.rs/assets/index-DW7tnTXP.js:908:12372
    at Ct (https://editor.graphite.rs/assets/index-DW7tnTXP.js:907:5957)
    at S2.o.wbg.__wbg_call_3b770f0d6eb4720e (https://editor.graphite.rs/assets/index-DW7tnTXP.js:908:12342)
    at graphite_wasm.wasm._ZN13graphite_wasm10editor_api12EditorHandle27send_frontend_message_to_js17hede8fc66aef6ad3cE (https://editor.graphite.rs/assets/graphite_wasm_bg-CVBdsMt_.wasm:wasm-function[4039]:0x89a8ee)
    at graphite_wasm.wasm._ZN4core3ops8function2Fn4call17ha2fcdffa052e1591E (https://editor.graphite.rs/assets/graphite_wasm_bg-CVBdsMt_.wasm:wasm-function[14089]:0xb55eec)
    at graphite_wasm.wasm._ZN3std9panicking20rust_panic_with_hook17hb39abb160cd4038cE (https://editor.graphite.rs/assets/graphite_wasm_bg-CVBdsMt_.wasm:wasm-function[7615]:0xa5fdf4)
    at graphite_wasm.wasm._ZN4core9panicking9panic_fmt17h6f4dae69dcc1a6d2E (https://editor.graphite.rs/assets/graphite_wasm_bg-CVBdsMt_.wasm:wasm-function[11789]:0xb2bfe2)
    at graphite_wasm.wasm._ZN5alloc3vec16Vec$LT$T$C$A$GT$6remove13assert_failed17h4799d1fa34bea83cE (https://editor.graphite.rs/assets/graphite_wasm_bg-CVBdsMt_.wasm:wasm-function[9971]:0xafcb46)
    at graphite_wasm.wasm._ZN349_$LT$graphite_editor..messages..portfolio..document..document_message_handler..DocumentMessageHandler$u20$as$u20$graphite_editor..utility_traits..MessageHandler$LT$graphite_editor..messages..portfolio..document..document_message..DocumentMessage$C$graphite_editor..messages..portfolio..document..document_message_handler..DocumentMessageData$GT$$GT$15process_message17h0ca022fdb3026fa4E (https://editor.graphite.rs/assets/graphite_wasm_bg-CVBdsMt_.wasm:wasm-function[303]:0xa71ee)
    at graphite_wasm.wasm._ZN325_$LT$graphite_editor..messages..portfolio..portfolio_message_handler..PortfolioMessageHandler$u20$as$u20$graphite_editor..utility_traits..MessageHandler$LT$graphite_editor..messages..portfolio..portfolio_message..PortfolioMessage$C$graphite_editor..messages..portfolio..portfolio_message_handler..PortfolioMessageData$GT$$GT$15process_message17h539ea4a2e673f68eE (https://editor.graphite.rs/assets/graphite_wasm_bg-CVBdsMt_.wasm:wasm-function[302]:0x7fbd3)
    at graphite_wasm.wasm._ZN15graphite_editor10dispatcher10Dispatcher14handle_message17hf31fb8dc968d0cc1E (https://editor.graphite.rs/assets/graphite_wasm_bg-CVBdsMt_.wasm:wasm-function[449]:0x27f889)
    at graphite_wasm.wasm._ZN13graphite_wasm10editor_api12EditorHandle8dispatch17ha8e4085a85846321E (https://editor.graphite.rs/assets/graphite_wasm_bg-CVBdsMt_.wasm:wasm-function[4967]:0x94390e)
    at graphite_wasm.wasm.editorhandle_onMouseDown (https://editor.graphite.rs/assets/graphite_wasm_bg-CVBdsMt_.wasm:wasm-function[5039]:0x951b6e)
    at C2.onMouseDown (https://editor.graphite.rs/assets/index-DW7tnTXP.js:908:5904)
    at $ (https://editor.graphite.rs/assets/index-DW7tnTXP.js:911:3504)
    at action (https://editor.graphite.rs/assets/index-DW7tnTXP.js:911:756)
@0HyperCube
Copy link
Member

Thanks for the report @qxzcode. It looks like it crashed whilst trying to remove the export from encapsulating_node_metadata.persistent_metadata.output_names.remove(export_index).

Given it didn't crash at the earlier network.exports.remove(export_index), the actual exports and the output names must have been out of sync for some reason. I can't really figure out why this would be the case as we always appear to modify them at the same time.

I can't seem to reproduce this issue, so it would be very useful if someone could try and get some reproduction steps.

Probably we shouldn't crash if no output name exists for the current export. A simple bounds check with a warning instead should resolve this.

@0HyperCube 0HyperCube added Good First Issue Good for newcomers Crash A panic which crashed the editor labels Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Crash A panic which crashed the editor Good First Issue Good for newcomers
Projects
Status: Short-Term
Development

No branches or pull requests

2 participants