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

Panic on startup in web build #4811

Closed
infmagic2047 opened this issue May 20, 2022 · 2 comments
Closed

Panic on startup in web build #4811

infmagic2047 opened this issue May 20, 2022 · 2 comments
Labels
C-Bug An unexpected or incorrect behavior O-Web Specific to web (WASM) builds P-High This is particularly urgent, and deserves immediate attention
Milestone

Comments

@infmagic2047
Copy link
Contributor

Bevy version

Main. This is caused by #4339 according to my test.

Operating system & version

Firefox 100.0.1 on Linux.

What you did

Run cargo run -p build-wasm-example -- shapes and open the generated page in browser.

What you expected to happen

Example running normally.

What actually happened

Nothing is displayed, and the following error is printed in console.

panicked at 'not yet implemented', <redacted>/wgpu-hal-0.12.5/src/gles/queue.rs:288:25

Stack:

init/imports.wbg.__wbg_new_693216e109162396@http://127.0.0.1:12345/target/wasm_example.js:408:21
console_error_panic_hook::hook::h175245a54082facd@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[6465]:0x7c9fc0
core::ops::function::Fn::call::h54cda502454c2ec2@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[27360]:0xa75da7
std::panicking::rust_panic_with_hook::hfa86900ad4160701@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[11051]:0x93bd3f
std::panicking::begin_panic_handler::{{closure}}::hb2a1d18d5f7c5c6f@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[13701]:0x9b6413
std::sys_common::backtrace::__rust_end_short_backtrace::hf88cb467b0094aae@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[21941]:0xa5ef7a
rust_begin_unwind@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[18863]:0xa3f67d
core::panicking::panic_fmt::h7cabf969fd4da0a3@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[18962]:0xa40f91
core::panicking::panic::h9910f31ba69e4858@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[18399]:0xa37805
wgpu_hal::gles::queue::<impl wgpu_hal::Queue<wgpu_hal::gles::Api> for wgpu_hal::gles::Queue>::submit::hc8ca2de3e785e49f@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[415]:0x11f8af
wgpu_core::device::queue::<impl wgpu_core::hub::Global<G>>::queue_submit::hd03fc7eb6e1af9df@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[369]:0x7b57e
<wgpu::backend::direct::Context as wgpu::Context>::queue_submit::h4891e44008ff5c35@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[6801]:0x7ee04a
bevy_render::renderer::render_system::had046c6ce34293ac@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[464]:0x17da29
<bevy_ecs::system::exclusive_system::ExclusiveSystemFn<F> as bevy_ecs::system::exclusive_system::ExclusiveSystem>::run::h0250626bda36337c@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[19357]:0xa46d02
<bevy_ecs::schedule::stage::SystemStage as bevy_ecs::schedule::stage::Stage>::run::hdedd82b5cf4bc12a@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[375]:0x9c531
<bevy_render::RenderPlugin as bevy_app::plugin::Plugin>::build::{{closure}}::h5a3ed159186dd5e8@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[5470]:0x754d8c
bevy_app::app::App::update::h356b26bf22fc790c@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[11520]:0x955b2e
winit::platform_impl::platform::event_loop::EventLoop<T>::run::{{closure}}::h3393e536ddd6b352@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[420]:0x12beea
winit::platform_impl::platform::event_loop::runner::Shared<T>::handle_event::h779af2e58f11a490@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[3197]:0x5e91f4
winit::platform_impl::platform::event_loop::runner::Shared<T>::run_until_cleared::hfa125a45ad665c35@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[2857]:0x5a0f3b
winit::platform_impl::platform::event_loop::runner::Shared<T>::set_listener::h375b7238afb5a37b@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[7650]:0x842693
winit::platform_impl::platform::event_loop::window_target::WindowTarget<T>::run::h8c699aa5f7c9e99f@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[12811]:0x9930e6
winit::platform_impl::platform::event_loop::EventLoop<T>::run::h8aeaf5835e762e0f@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[15593]:0x9f57a3
winit::event_loop::EventLoop<T>::run::h9da0ea4d0d996478@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[19946]:0xa4e8ad
bevy_winit::run::hbe2066f32bc15dff@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[19945]:0xa4e883
bevy_winit::winit_runner_with::h3de034c40bd253dc@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[955]:0x3060f4
bevy_winit::winit_runner::hd20c94ed2bdc8eb1@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[20176]:0xa51004
core::ops::function::Fn::call::h7819bdc31eb5819d@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[20173]:0xa50f8c
bevy_app::app::App::run::hb6284a79d50b85fb@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[12773]:0x991736
shapes::main::h14ef11c8fe7e6d3a@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[930]:0x2f7e92
std::sys_common::backtrace::__rust_begin_short_backtrace::hf18ad2a613451d60@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[27273]:0xa75ae5
std::rt::lang_start::{{closure}}::hebfd3768bf0d1659@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[19583]:0xa4a03a
std::rt::lang_start_internal::h4150b5b0c22fc5fd@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[11473]:0x953283
main@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[19584]:0xa4a07c
@http://127.0.0.1:12345/target/wasm_example_bg.wasm:wasm-function[25680]:0xa71128
init@http://127.0.0.1:12345/target/wasm_example.js:1668:10
async*@http://127.0.0.1:12345/:25:5
@infmagic2047 infmagic2047 added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels May 20, 2022
@mockersf
Copy link
Member

mockersf commented May 20, 2022

I can reproduce. The panic is not always the same depending on the example

Example shapes panic at https://github.com/gfx-rs/wgpu/blob/3f4144a53b5ce80b9d89655f84534cfee74fc1ba/wgpu-hal/src/gles/queue.rs#L288

On example lighting, it's failing at https://github.com/gfx-rs/wgpu/blob/3f4144a53b5ce80b9d89655f84534cfee74fc1ba/wgpu-hal/src/gles/device.rs#L873

panicked at 'called `Option::unwrap()` on a `None` value', /.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-hal-0.12.5/src/gles/device.rs:873:44

Stack:

init/imports.wbg.__wbg_new_693216e109162396@http://localhost:4000/target/wasm_example.js:408:21
console_error_panic_hook::hook::h09769f7982973f6b@http://localhost:4000/target/wasm_example_bg.wasm:wasm-function[6509]:0x7d01a8
core::ops::function::Fn::call::h02988728b48377b4@http://localhost:4000/target/wasm_example_bg.wasm:wasm-function[27358]:0xa75bb8
std::panicking::rust_panic_with_hook::he2a025723e105e28@http://localhost:4000/target/wasm_example_bg.wasm:wasm-function[11033]:0x93c5ea
...

@mockersf mockersf added P-High This is particularly urgent, and deserves immediate attention O-Web Specific to web (WASM) builds and removed S-Needs-Triage This issue needs to be labelled labels May 20, 2022
@mockersf
Copy link
Member

@teoxoy @superdump any idea?

@alice-i-cecile alice-i-cecile added this to the Bevy 0.8 milestone May 20, 2022
@bors bors bot closed this as completed in b6eeded May 20, 2022
james7132 pushed a commit to james7132/bevy that referenced this issue Jun 7, 2022
…es (bevyengine#4816)

# Objective

fixes bevyengine#4811 (caused by bevyengine#4339 [[exact change](https://github.com/bevyengine/bevy/pull/4339/files#diff-4bf3ed03d4129aad9f5678ba19f9b14ee8e3e61d6f6365e82197b01c74468b10R712-R721)] - where the buffer type has been changed from `UniformVec` to `BufferVec`)

## Solution

Use uniform buffer usage for `SkinnedMeshUniform` instead of all usages due to the `Default` derive.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this issue Feb 1, 2023
…es (bevyengine#4816)

# Objective

fixes bevyengine#4811 (caused by bevyengine#4339 [[exact change](https://github.com/bevyengine/bevy/pull/4339/files#diff-4bf3ed03d4129aad9f5678ba19f9b14ee8e3e61d6f6365e82197b01c74468b10R712-R721)] - where the buffer type has been changed from `UniformVec` to `BufferVec`)

## Solution

Use uniform buffer usage for `SkinnedMeshUniform` instead of all usages due to the `Default` derive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug An unexpected or incorrect behavior O-Web Specific to web (WASM) builds P-High This is particularly urgent, and deserves immediate attention
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants