You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building for wasm, the browser throws an unwrap error for the cube example. I haven't tested the others but may be the same with them as well. Note: This is for WebGPU as WebGL works fine.
Repro Steps:
Download Repository
Cargo build --example cube
Cargo run-wasm --example cube
Open browser to local host and check the console.
Error when using non WebGPU supported Chrome.
panicked at 'called `Result::unwrap()` on an `Err` value: CreateSurfaceError', wgpu\examples\cube\..\framework.rs:182:10
Stack:
Error
at imports.wbg.__wbg_new_abda76e883ba8a5f (http://localhost:8000/cube.js:561:21)
at console_error_panic_hook::Error::new::hf3e514ed9e575257 (http://localhost:8000/cube_bg.wasm:wasm-function[5123]:0x13211c)
at console_error_panic_hook::hook_impl::h1297dd701c817dab (http://localhost:8000/cube_bg.wasm:wasm-function[876]:0x8c79f)
at console_error_panic_hook::hook::h04af7c2d5894232a (http://localhost:8000/cube_bg.wasm:wasm-function[5751]:0x13a9fe)
at core::ops::function::Fn::call::h25e0e9d5e3ca4b78 (http://localhost:8000/cube_bg.wasm:wasm-function[4752]:0x12c4e8)
at std::panicking::rust_panic_with_hook::hbafe3e603d331223 (http://localhost:8000/cube_bg.wasm:wasm-function[2046]:0xde776)
at std::panicking::begin_panic_handler::{{closure}}::h8ab6ee68d5b4c391 (http://localhost:8000/cube_bg.wasm:wasm-function[2542]:0xf54b7)
at std::sys_common::backtrace::__rust_end_short_backtrace::h008f69666d134159 (http://localhost:8000/cube_bg.wasm:wasm-function[6136]:0x13f80b)
at rust_begin_unwind (http://localhost:8000/cube_bg.wasm:wasm-function[4003]:0x11e82c)
at core::panicking::panic_fmt::h1d17fc068f528130 (http://localhost:8000/cube_bg.wasm:wasm-function[5582]:0x138797)
imports.wbg.__wbg_error_f851667af71bcfc6 @ cube.js:555
cube_bg.wasm:0x143762 Uncaught (in promise) RuntimeError: unreachable
at __rust_start_panic (cube_bg.wasm:0x143762)
at rust_panic (cube_bg.wasm:0x141370)
at std::panicking::rust_panic_with_hook::hbafe3e603d331223 (cube_bg.wasm:0xde7a1)
at std::panicking::begin_panic_handler::{{closure}}::h8ab6ee68d5b4c391 (cube_bg.wasm:0xf54b7)
at std::sys_common::backtrace::__rust_end_short_backtrace::h008f69666d134159 (cube_bg.wasm:0x13f80b)
at rust_begin_unwind (cube_bg.wasm:0x11e82c)
at core::panicking::panic_fmt::h1d17fc068f528130 (cube_bg.wasm:0x138797)
at core::result::unwrap_failed::ha2d692f1494e5dde (cube_bg.wasm:0xfef7e)
at core::result::Result<T,E>::unwrap::h266b8eab0d7d0dcf (cube_bg.wasm:0x1011a3)
at cube::framework::setup::{{closure}}::h2c8d338493feb534 (cube_bg.wasm:0xd32d)
`
Thanks! That explains the issue well and is probably also why I didn't find this problem already listed. I did not realize it was an issue with dynamic dispatch.
When building for wasm, the browser throws an unwrap error for the cube example. I haven't tested the others but may be the same with them as well. Note: This is for WebGPU as WebGL works fine.
Repro Steps:
Error when using non WebGPU supported Chrome.
Error on Canary with WebGPU support
The text was updated successfully, but these errors were encountered: