Closed MrFastDie closed 4 months ago
are there any errors on the browser's console on the failure cases Did you experience any issues with this on native?
Ah yes sorry, wenn the BorrowMutexErr occurs:
panicked at /home/daniel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-futures-0.4.42/src/lib.rs:136:39:
already borrowed: BorrowMutError
Stack:
__wbg_get_imports/imports.wbg.__wbg_new_abda76e883ba8a5f@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:387:21
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[4123]:0x27f99d
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1780]:0x1cca39
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3059]:0x26fa0d
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[2648]:0x24315b
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1692]:0x1c52ba
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[2740]:0x2455ca
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3618]:0x277aef
__wbg_adapter_58@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:240:10
real@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:209:20
promise callback*__wbg_get_imports/imports.wbg.__wbg_then_a73caa9a87991566@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:2368:37
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3718]:0x278f0e
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1097]:0x16df07
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[2170]:0x1f77d8
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[607]:0x81f06
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1237]:0x18b33e
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3619]:0x277afd
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3618]:0x277aef
__wbg_adapter_58@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:240:10
real@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:209:20
VoidFunction*__wbg_get_imports/imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:2245:23
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1890]:0x1d840e
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[2053]:0x1e9df0
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1692]:0x1c52af
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[2740]:0x2455ca
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3618]:0x277aef
__wbg_adapter_58@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:240:10
real@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:209:20
promise callback*__wbg_get_imports/imports.wbg.__wbg_then_a73caa9a87991566@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:2368:37
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3718]:0x278f0e
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1097]:0x16df07
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[2025]:0x1e5d52
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[607]:0x81b6c
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1237]:0x18b33e
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3619]:0x277afd
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3618]:0x277aef
__wbg_adapter_58@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:240:10
real@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:209:20
VoidFunction*__wbg_get_imports/imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:2245:23
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1890]:0x1d840e
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[2555]:0x24106d
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[713]:0xe3ef4
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1237]:0x18b33e
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3619]:0x277afd
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3618]:0x277aef
__wbg_adapter_58@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:240:10
real@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:209:20
VoidFunction*__wbg_get_imports/imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:2245:23
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1890]:0x1d840e
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[2555]:0x24106d
[rusty_cube_wasm.js:403:20](http://localhost:5173/src/wasm/rusty_cube_wasm.js)
Uncaught (in promise) RuntimeError: unreachable executed
__wbg_adapter_58 rusty_cube_wasm.js:240
real rusty_cube_wasm.js:209
promise callback*__wbg_get_imports/imports.wbg.__wbg_then_a73caa9a87991566 rusty_cube_wasm.js:2368
__wbg_adapter_58 rusty_cube_wasm.js:240
real rusty_cube_wasm.js:209
__wbg_queueMicrotask_481971b0d87f3dd4 rusty_cube_wasm.js:2245
__wbg_adapter_58 rusty_cube_wasm.js:240
real rusty_cube_wasm.js:209
promise callback*__wbg_get_imports/imports.wbg.__wbg_then_a73caa9a87991566 rusty_cube_wasm.js:2368
__wbg_adapter_58 rusty_cube_wasm.js:240
real rusty_cube_wasm.js:209
__wbg_queueMicrotask_481971b0d87f3dd4 rusty_cube_wasm.js:2245
__wbg_adapter_58 rusty_cube_wasm.js:240
real rusty_cube_wasm.js:209
__wbg_queueMicrotask_481971b0d87f3dd4
panicked at wasm/src/lib.rs:162:10:
Failed to find an appropriate adapter
Stack:
__wbg_get_imports/imports.wbg.__wbg_new_abda76e883ba8a5f@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:387:21
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[4123]:0x27f99d
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1780]:0x1cca39
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3059]:0x26fa0d
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[2849]:0x24b152
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3327]:0x273be1
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[607]:0x81cf3
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1237]:0x18b33e
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3619]:0x277afd
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3618]:0x277aef
__wbg_adapter_58@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:240:10
real@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:209:20
VoidFunction*__wbg_get_imports/imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:2245:23
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1890]:0x1d840e
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[2053]:0x1e9df0
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1692]:0x1c52af
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[2740]:0x2455ca
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3618]:0x277aef
__wbg_adapter_58@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:240:10
real@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:209:20
promise callback*__wbg_get_imports/imports.wbg.__wbg_then_a73caa9a87991566@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:2368:37
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3718]:0x278f0e
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1097]:0x16df07
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[2170]:0x1f77d8
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[607]:0x81f06
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1237]:0x18b33e
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3619]:0x277afd
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3618]:0x277aef
__wbg_adapter_58@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:240:10
real@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:209:20
VoidFunction*__wbg_get_imports/imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:2245:23
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1890]:0x1d840e
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[2053]:0x1e9df0
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1692]:0x1c52af
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[2740]:0x2455ca
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3618]:0x277aef
__wbg_adapter_58@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:240:10
real@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:209:20
promise callback*__wbg_get_imports/imports.wbg.__wbg_then_a73caa9a87991566@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:2368:37
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3718]:0x278f0e
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1097]:0x16df07
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[2025]:0x1e5d52
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[607]:0x81b6c
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1237]:0x18b33e
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3619]:0x277afd
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3618]:0x277aef
__wbg_adapter_58@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:240:10
real@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:209:20
VoidFunction*__wbg_get_imports/imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:2245:23
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1890]:0x1d840e
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[2555]:0x24106d
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[713]:0xe3ef4
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1237]:0x18b33e
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3619]:0x277afd
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[3618]:0x277aef
__wbg_adapter_58@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:240:10
real@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:209:20
VoidFunction*__wbg_get_imports/imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4@http://localhost:5173/src/wasm/rusty_cube_wasm.js?t=1719383020861:2245:23
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[1890]:0x1d840e
@http://localhost:5173/src/wasm/rusty_cube_wasm_bg.wasm:wasm-function[2555]:0x24106d
rusty_cube_wasm.js:403:20
Uncaught RuntimeError: unreachable executed
__wbg_adapter_58 rusty_cube_wasm.js:240
real rusty_cube_wasm.js:209
__wbg_queueMicrotask_481971b0d87f3dd4 rusty_cube_wasm.js:2245
__wbg_adapter_58 rusty_cube_wasm.js:240
real rusty_cube_wasm.js:209
promise callback*__wbg_get_imports/imports.wbg.__wbg_then_a73caa9a87991566 rusty_cube_wasm.js:2368
__wbg_adapter_58 rusty_cube_wasm.js:240
real rusty_cube_wasm.js:209
__wbg_queueMicrotask_481971b0d87f3dd4 rusty_cube_wasm.js:2245
__wbg_adapter_58 rusty_cube_wasm.js:240
real rusty_cube_wasm.js:209
promise callback*__wbg_get_imports/imports.wbg.__wbg_then_a73caa9a87991566 rusty_cube_wasm.js:2368
__wbg_adapter_58 rusty_cube_wasm.js:240
real rusty_cube_wasm.js:209
__wbg_queueMicrotask_481971b0d87f3dd4 rusty_cube_wasm.js:2245
__wbg_adapter_58 rusty_cube_wasm.js:240
real rusty_cube_wasm.js:209
__wbg_queueMicrotask_481971b0d87f3dd4 rusty_cube_wasm.js:2245
rusty_cube_wasm_bg.wasm:1886815:1
and
Uncaught (in promise) Error: closure invoked recursively or after being dropped
__wbindgen_throw rusty_cube_wasm.js:2430
__wbg_adapter_58 rusty_cube_wasm.js:240
real rusty_cube_wasm.js:209
promise callback*__wbg_get_imports/imports.wbg.__wbg_then_a73caa9a87991566 rusty_cube_wasm.js:2368
__wbg_adapter_58 rusty_cube_wasm.js:240
real rusty_cube_wasm.js:209
__wbg_queueMicrotask_481971b0d87f3dd4 rusty_cube_wasm.js:2245
__wbg_adapter_58 rusty_cube_wasm.js:240
real rusty_cube_wasm.js:209
__wbg_queueMicrotask_481971b0d87f3dd4 rusty_cube_wasm.js:2245
__wbg_adapter_1106 rusty_cube_wasm.js:284
cb0 rusty_cube_wasm.js:2344
__wbg_new_81740750da40724f rusty_cube_wasm.js:2349
State rusty_cube_wasm.js:317
initializeWasm wasm.tsx:12
WasmComponent wasm.tsx:18
commitHookEffectListMount chunk-52HAZHR6.js:24343
invokePassiveEffectMountInDEV chunk-52HAZHR6.js:25759
invokeEffectsInDev chunk-52HAZHR6.js:27136
commitDoubleInvokeEffectsInDEV chunk-52HAZHR6.js:27121
flushPassiveEffectsImpl chunk-52HAZHR6.js:26938
flushPassiveEffects chunk-52HAZHR6.js:26882
commitRootImpl chunk-52HAZHR6.js:26763
workLoop chunk-52HAZHR6.js:485
flushWork chunk-52HAZHR6.js:464
performWorkUntilDeadline chunk-52HAZHR6.js:672
js chunk-52HAZHR6.js:693
js chunk-52HAZHR6.js:741
__require chunk-OP2PB36O.js:18
js chunk-52HAZHR6.js:756
__require chunk-OP2PB36O.js:18
js chunk-52HAZHR6.js:7920
js chunk-52HAZHR6.js:28995
__require chunk-OP2PB36O.js:18
js chunk-52HAZHR6.js:29024
__require chunk-OP2PB36O.js:18
js react-dom_client.js:26
__require chunk-OP2PB36O.js:18
<anonymous> react-dom_client.js:52
rusty_cube_wasm.js:2430:14
are there any errors on the browser's console on the failure cases Did you experience any issues with this on native?
With on native you mean with no features enabled? It's the same but the errors seem to occur less but that at this point could just be the stars align different for me.
I meant when running this not as a web application but the same code for a native application. Nevermind if that's too much trouble setting up for you right now.
Thanks for those logs. Without more symbols they aren't unfortunately very useful. I was hoping that there's some useful callstack or that wgpu logged some more errors before this happens - there's nothing there? That would first require some setup like https://github.com/gfx-rs/wgpu/blob/trunk/examples/src/framework.rs#L55
As-is, the only thing to go about this bug boils down essentially to debugging the application code you posted, a bit much as a starting point :/
I don't think this is an issue on our side, please reopen if further debugging shows otherwise.
I'm also getting already borrowed: BorrowMutError
when I upgrade wgpu from 0.20.1 to 22.0 on Firefox. something about grabbing an adapter failed. will have to look into this more
Edit: yep. it's a consistent bug for me both for Firefox and Chromium. This is my config where I reverted back to a version of WGPU where it works in the browser. https://github.com/lexi-the-cute/catgirl-engine/commit/0f83bba143dda4c4e18bd56b32fe3553d89c118f#diff-d65079572c3a43b4c213b69ff6258e5c7dde09a43ec9905135062c52b3fc1654R111
Description So it's a strange behavior that I cannot always reproduce. Sometimes when I reload my browser I get the error, that I cannot crate an adapter. Sometimes it strangely works, its a question of how much I am willing to refresh the page.
Repro steps Just remove the macros from below, they just do some
console.log
stuff for me.You will see three behaviors:
cargo.toml (For some reason enabling WebGL features forcing me to include getrandom)
.cargo/config.toml:
Expected vs observed behavior My expected behavior is that my cube should draw every time I refresh the page
Platform Right now I'm running Arch with a AMD gpu and the
vulkan-amdgpu-pro
driver but I get the same behavior on my Macbook with Chrome and Safari. Strangly I can't get WebGPU running on Chrome on arch at all - but that seems more like a chrome bug. Chromium on Arch is the same as Firefox for me.