GraphiteEditor / Graphite

2D vector & raster editor that melds traditional layers & tools with a modern node-based, non-destructive, procedural workflow.
https://graphite.rs
Apache License 2.0
9.42k stars 453 forks source link

[Crash Report] Trying to blend 2 images #2108

Open carlo-colombo opened 6 days ago

carlo-colombo commented 6 days ago

Describe the Crash I imported 2 images in the editor, then added a Rasterize blend node, when I tried to connect the output of the blend node to a transform to output in a layer it crashed

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. add 2 images
  3. add blend node
  4. output blend to a layer

Additional Details Provide any further information or context that you think would be helpful in fixing the issue. Screenshots or video can be linked or attached to this issue.

Screenshot 2024-11-12 at 07 48 53

Browser and OS Chrome 130, Mac

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

panicked at node-graph/gcore/src/raster/image.rs:162:9:
assertion `left == right` failed
  left: 211600
 right: 1558440

Error
    at https://editor.graphite.rs/assets/index-StBtR31p.js:706:1169
    at p (https://editor.graphite.rs/assets/index-StBtR31p.js:691:5216)
    at Object.handleJsMessage (https://editor.graphite.rs/assets/index-StBtR31p.js:691:5364)
    at https://editor.graphite.rs/assets/index-StBtR31p.js:692:63200
    at https://editor.graphite.rs/assets/index-StBtR31p.js:692:35871
    at et (https://editor.graphite.rs/assets/index-StBtR31p.js:692:1842)
    at P0.o.wbg.__wbg_call_5fb7c8066a4a4825 (https://editor.graphite.rs/assets/index-StBtR31p.js:692:35841)
    at graphite_wasm.wasm._ZN13graphite_wasm10editor_api12EditorHandle27send_frontend_message_to_js17he2260553331a2c0eE (https://editor.graphite.rs/assets/graphite_wasm_bg-hUH_VdBe.wasm:wasm-function[3760]:0x80c152)
    at graphite_wasm.wasm._ZN4core3ops8function2Fn4call17haad1996cb846aa98E (https://editor.graphite.rs/assets/graphite_wasm_bg-hUH_VdBe.wasm:wasm-function[13566]:0xaccd7c)
    at graphite_wasm.wasm._ZN3std9panicking20rust_panic_with_hook17he5c089ac7305193eE (https://editor.graphite.rs/assets/graphite_wasm_bg-hUH_VdBe.wasm:wasm-function[6938]:0x9a80e6)
    at graphite_wasm.wasm._ZN4core9panicking9panic_fmt17hdc8d2d914c0710e4E (https://editor.graphite.rs/assets/graphite_wasm_bg-hUH_VdBe.wasm:wasm-function[10356]:0xa7e74c)
    at graphite_wasm.wasm._ZN4core9panicking19assert_failed_inner17hac6df1fbe8940f48E (https://editor.graphite.rs/assets/graphite_wasm_bg-hUH_VdBe.wasm:wasm-function[4538]:0x8a2e32)
    at graphite_wasm.wasm._ZN13graphene_core6raster5image14Image$LT$P$GT$10to_flat_u817h4555360db951b76cE (https://editor.graphite.rs/assets/graphite_wasm_bg-hUH_VdBe.wasm:wasm-function[2052]:0x65b99d)
    at graphite_wasm.wasm._ZN13graphene_core6raster5image48Image$LT$graphene_core..raster..color..Color$GT$6to_png17h47de683678e9d25eE (https://editor.graphite.rs/assets/graphite_wasm_bg-hUH_VdBe.wasm:wasm-function[5226]:0x8fe603)
    at graphite_wasm.wasm._ZN123_$LT$graphene_core..graphic_element..Raster$u20$as$u20$graphene_core..graphic_element..renderer..GraphicElementRendered$GT$10render_svg17h7930ea5fdb36609dE (https://editor.graphite.rs/assets/graphite_wasm_bg-hUH_VdBe.wasm:wasm-function[1123]:0x4d133b)
    at graphite_wasm.wasm._ZN129_$LT$graphene_core..graphic_element..GraphicGroup$u20$as$u20$graphene_core..graphic_element..renderer..GraphicElementRendered$GT$10render_svg17ha65ae070e1b3686eE (https://editor.graphite.rs/assets/graphite_wasm_bg-hUH_VdBe.wasm:wasm-function[1339]:0x55148b)
    at graphite_wasm.wasm._ZN12graphene_std19wasm_application_io6render28_$u7b$$u7b$closure$u7d$$u7d$17h05695b0b382f62c1E (https://editor.graphite.rs/assets/graphite_wasm_bg-hUH_VdBe.wasm:wasm-function[533]:0x2ed250)
    at graphite_wasm.wasm._ZN150_$LT$graphene_core..registry..DynAnyNode$LT$_I$C$_O$C$N$GT$$u20$as$u20$graphene_core..Node$LT$alloc..boxed..Box$LT$dyn$u20$dyn_any..DynAny$GT$$GT$$GT$4eval28_$u7b$$u7b$closure$u7d$$u7d$28_$u7b$$u7b$closure$u7d$$u7d$17h09caeea081fb414aE (https://editor.graphite.rs/assets/graphite_wasm_bg-hUH_VdBe.wasm:wasm-function[6121]:0x95db0e)
    at graphite_wasm.wasm._ZN173_$LT$$RF$interpreted_executor..dynamic_executor..DynamicExecutor$u20$as$u20$graph_craft..graphene_compiler..Executor$LT$I$C$graph_craft..document..value..TaggedValue$GT$$GT$7execute28_$u7b$$u7b$closure$u7d$$u7d$17haa162f81f698bdb7E.llvm.10675772075615849968 (https://editor.graphite.rs/assets/graphite_wasm_bg-hUH_VdBe.wasm:wasm-function[3839]:0x81a715)
    at graphite_wasm.wasm._ZN13graphite_wasm10editor_api26poll_node_graph_evaluation28_$u7b$$u7b$closure$u7d$$u7d$17hf0998fcf8cb87065E (https://editor.graphite.rs/assets/graphite_wasm_bg-hUH_VdBe.wasm:wasm-function[5317]:0x91193c)
    at graphite_wasm.wasm._ZN20wasm_bindgen_futures5queue10QueueState7run_all17hd97bfc3873db4599E (https://editor.graphite.rs/assets/graphite_wasm_bg-hUH_VdBe.wasm:wasm-function[3837]:0x81a0be)
    at graphite_wasm.wasm._ZN20wasm_bindgen_futures5queue5Queue3new28_$u7b$$u7b$closure$u7d$$u7d$17h09657dd8eac6fbb0E.llvm.4933978826303673485 (https://editor.graphite.rs/assets/graphite_wasm_bg-hUH_VdBe.wasm:wasm-function[11857]:0xaa29aa)
    at graphite_wasm.wasm._ZN136_$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$A$C$$RP$$GT$$u2b$Output$u20$$u3d$$u20$R$u20$as$u20$wasm_bindgen..closure..WasmClosure$GT$8describe6invoke17h34d207096920c174E (https://editor.graphite.rs/assets/graphite_wasm_bg-hUH_VdBe.wasm:wasm-function[11856]:0xaa299c)
    at graphite_wasm.wasm.closure10070 externref shim (https://editor.graphite.rs/assets/graphite_wasm_bg-hUH_VdBe.wasm:wasm-function[12019]:0xaa4769)
    at y0 (https://editor.graphite.rs/assets/index-StBtR31p.js:692:891)
    at i (https://editor.graphite.rs/assets/index-StBtR31p.js:692:266)
Keavon commented 6 days ago

Thanks for the report. We should probably just remove the Blend node because it's not maintained at the moment. But any crash is a bug that needs to be fixed. Without looking at the code, I would speculate the issue is that the dimensions of both images don't match which is a limitation of the current unmaintained Blend node.

Right now, you'll want to just use two layers for compositing— and you can use the Rasterize node on the stacked output if you need it as a single image.

carlo-colombo commented 4 days ago

Thank you for the suggestion.