Skip to content

Some wasm examples fail at rendering #4958

@Zentropivity

Description

@Zentropivity

Bevy version

bevy main 0.8.0-dev cbf0324

Relevant system information

Tested browsers:

  • Firefox 101.0
    GPU info: AdapterInfo { name: "NVIDIA GeForce GTX 980/PCIe/SSE2", vendor: 4318, device: 0, device_type: DiscreteGpu, backend: Gl }
  • Chromium 102.0.5005.61
    GPU info: AdapterInfo { name: "ANGLE (NVIDIA Corporation, NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2, OpenGL 4.5.0)", vendor: 4318, device: 0, device_type: DiscreteGpu, backend: Gl }

.cargo/config.toml:

[target.wasm32-unknown-unknown]
runner = "wasm-server-runner"

What you did

Ran the examples split_screen and post_processing using wasm_server_runner.

  1. Start the examples in a terminal:
    • cargo run --release --target wasm32-unknown-unknown --example split_screen
    • cargo run --release --target wasm32-unknown-unknown --example post_processing
  2. Open browser where wasm_server_runner indicated (http://127.0.0.1:1334/).

What went wrong

Split screen example

The 3D views rendered on top of one another instead of side-by-side like they are supposed to.

Picture in Firefox
Picture in Chromium

Post processing example

Panics with:

wgpu error: Validation Error

Caused by:
    In Device::create_render_pipeline
      note: label = `transparent_mesh2d_pipeline`
    Internal error in FRAGMENT shader: The selected version doesn't support CUBE_TEXTURES_ARRAY
Picture in Firefox

Additional information

  • Full log of post processing example in Firefox:
InstallTrigger is deprecated and will be removed in the future. constants.js:50:14
WEBGL_debug_renderer_info is deprecated in Firefox and will be removed. Please use RENDERER. wasm.js:759:29
INFO crates/bevy_render/src/renderer/mod.rs:98 AdapterInfo { name: "NVIDIA GeForce GTX 980/PCIe/SSE2", vendor: 4318, device: 0, device_type: DiscreteGpu, backend: Gl } wasm.js:389:9
WARN crates/bevy_asset/src/io/wasm_asset_io.rs:52 Watching for changes is not supported in WASM wasm.js:389:9
WebGL warning: getSyncParameter: ClientWaitSync must return TIMEOUT_EXPIRED until control has returned to the user agent's main loop. (only warns once) 4
Uncaught (in promise) Error: Using exceptions for control flow, don't mind me. This isn't actually an error!
    __wbindgen_throw http://127.0.0.1:1334/api/wasm.js:1640
    init http://127.0.0.1:1334/api/wasm.js:1701
wasm.js:1640:7
ERROR  Handling wgpu errors as fatal by default log.target = "wgpu::backend::direct";
log.module_path = "wgpu::backend::direct";
log.file = "/home/zen/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.12.0/src/backend/direct.rs";
log.line = 2272; wasm.js:389:9
panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_render_pipeline
      note: label = `transparent_mesh2d_pipeline`
    Internal error in FRAGMENT shader: The selected version doesn't support CUBE_TEXTURES_ARRAY

', /home/zen/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.12.0/src/backend/direct.rs:2273:5

Stack:

init/imports.wbg.__wbg_new_693216e109162396@http://127.0.0.1:1334/api/wasm.js:406:13
console_error_panic_hook::hook::h0b803ff9914ecf8f@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[6867]:0x83af75
core::ops::function::Fn::call::ha1425ae48bf12a54@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[28830]:0xaf7f65
std::panicking::rust_panic_with_hook::he2a025723e105e28@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[11464]:0x9ab170
std::panicking::begin_panic_handler::{{closure}}::hd9f8c213ec91b9d5@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[14287]:0xa2dd9b
std::sys_common::backtrace::__rust_end_short_backtrace::h6efd730283875809@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[23021]:0xadf6c0
rust_begin_unwind@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[19703]:0xabd809
core::panicking::panic_fmt::hb02133958c1e7d35@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[19807]:0xabf26f
core::ops::function::Fn::call::haeff594665bcafdb@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[12532]:0x9e40e6
wgpu::backend::direct::ErrorSinkRaw::handle_error::hbde96cf3f5004626@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[8417]:0x8d4a27
<wgpu::backend::direct::Context as wgpu::Context>::device_create_render_pipeline::h40e092eb7425341b@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[722]:0x2786dc
wgpu::Device::create_render_pipeline::hc0534200fc4a6734@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[19369]:0xab7e41
bevy_render::render_resource::pipeline_cache::PipelineCache::process_queue::hb565c66afca8637d@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[446]:0x151499
<bevy_ecs::system::function_system::FunctionSystem<In,Out,Param,Marker,F> as bevy_ecs::system::system::System>::run_unsafe::hb816da207b9d725e@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[11952]:0x9c5f4a
<core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h8525e55221c0c1cf@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[2114]:0x4f8eac
async_task::raw::RawTask<F,T,S>::run::h04a89f43e3ea24d6@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[1813]:0x48e675
async_task::runnable::Runnable::run::h27375f60d55cdf91@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[26940]:0xaf282b
async_executor::LocalExecutor::try_tick::h224c843d5bac985a@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[7927]:0x8a6d85
bevy_tasks::single_threaded_task_pool::TaskPool::scope::h46d1755c487649a7@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[3598]:0x6655bd
<bevy_ecs::schedule::executor_parallel::ParallelExecutor as bevy_ecs::schedule::executor::ParallelSystemExecutor>::run_systems::h275c0e465fae10ba@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[1769]:0x47e0cb
<bevy_ecs::schedule::stage::SystemStage as bevy_ecs::schedule::stage::Stage>::run::h3988de8c255bea61@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[382]:0x99ab2
<bevy_render::RenderPlugin as bevy_app::plugin::Plugin>::build::{{closure}}::h8ed871fa24c25121@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[5837]:0x7c1897
bevy_app::app::App::update::h0992168eced72da0@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[12010]:0x9c9160
winit::platform_impl::platform::event_loop::EventLoop<T>::run::{{closure}}::h5f93a4d5af7f46eb@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[428]:0x12b6ea
winit::platform_impl::platform::event_loop::runner::Shared<T>::handle_event::h9744ec1089522047@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[3341]:0x63411b
winit::platform_impl::platform::event_loop::runner::Shared<T>::run_until_cleared::he1524decd5146b84@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[2965]:0x5e337f
winit::platform_impl::platform::backend::timeout::AnimationFrameRequest::new::{{closure}}::hb2d480df929a8efb@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[19436]:0xab9089
<dyn core::ops::function::FnMut<()>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::hfa02b9b12888357d@http://127.0.0.1:1334/api/wasm.wasm:wasm-function[21800]:0xad710c
__wbg_adapter_38@http://127.0.0.1:1334/api/wasm.js:223:6
real@http://127.0.0.1:1334/api/wasm.js:200:32


wasm.js:418:9
Uncaught RuntimeError: unreachable executed
    __wbg_adapter_38 http://127.0.0.1:1334/api/wasm.js:223
    real http://127.0.0.1:1334/api/wasm.js:200
wasm.wasm:11512699:1
  • Full log of post processing example in Chromium:
wasm.js:389 INFO crates/bevy_render/src/renderer/mod.rs:98 AdapterInfo { name: "ANGLE (NVIDIA Corporation, NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2, OpenGL 4.5.0)", vendor: 4318, device: 0, device_type: DiscreteGpu, backend: Gl }
wasm.js:1474 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
(anonymous) @ wasm.js:1474
wasm.js:1490 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
(anonymous) @ wasm.js:1490
wasm.js:389 WARN crates/bevy_asset/src/io/wasm_asset_io.rs:52 Watching for changes is not supported in WASM
wasm.js:1640 Uncaught (in promise) Error: Using exceptions for control flow, don't mind me. This isn't actually an error!
    at imports.wbg.__wbindgen_throw (wasm.js:1640:7)
    at wasm_bindgen::throw_str::h762e90b69142d3ee (wasm.wasm:0xaf5c71)
    at winit::platform_impl::platform::backend::throw::h5cedbc51196c9be0 (wasm.wasm:0xaf2eb9)
    at winit::platform_impl::platform::event_loop::EventLoop<T>::run::h9466a53aeac2368d (wasm.wasm:0xa6f0fe)
    at winit::event_loop::EventLoop<T>::run::hdf802d86f7fa4083 (wasm.wasm:0xacdde5)
    at bevy_winit::run::h67078f9741d493f9 (wasm.wasm:0xacde0e)
    at bevy_winit::winit_runner_with::h4d6055fe3eb34529 (wasm.wasm:0x28eec1)
    at bevy_winit::winit_runner::hc4248f10cedd8e6d (wasm.wasm:0xad0084)
    at core::ops::function::Fn::call::h9ec779444b4278d1 (wasm.wasm:0xacffe2)
    at bevy_app::app::App::run::hf547d290a53e762f (wasm.wasm:0xa075c8)
wasm.js:1463 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
(anonymous) @ wasm.js:1463
wasm.js:1463 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
(anonymous) @ wasm.js:1463
wasm.js:389 ERROR  Handling wgpu errors as fatal by default log.target = "wgpu::backend::direct";log.module_path = "wgpu::backend::direct";log.file = "/home/zen/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.12.0/src/backend/direct.rs";log.line = 2272;
wasm.js:418 panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_render_pipeline
      note: label = `transparent_mesh2d_pipeline`
    Internal error in FRAGMENT shader: The selected version doesn't support CUBE_TEXTURES_ARRAY

', /home/zen/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.12.0/src/backend/direct.rs:2273:5

Stack:

Error
    at imports.wbg.__wbg_new_693216e109162396 (http://127.0.0.1:1334/api/wasm.js:406:13)
    at console_error_panic_hook::hook::h0b803ff9914ecf8f (http://127.0.0.1:1334/api/wasm.wasm:wasm-function[6867]:0x83af75)
    at core::ops::function::Fn::call::ha1425ae48bf12a54 (http://127.0.0.1:1334/api/wasm.wasm:wasm-function[28830]:0xaf7f65)
    at std::panicking::rust_panic_with_hook::he2a025723e105e28 (http://127.0.0.1:1334/api/wasm.wasm:wasm-function[11464]:0x9ab170)
    at std::panicking::begin_panic_handler::{{closure}}::hd9f8c213ec91b9d5 (http://127.0.0.1:1334/api/wasm.wasm:wasm-function[14287]:0xa2dd9b)
    at std::sys_common::backtrace::__rust_end_short_backtrace::h6efd730283875809 (http://127.0.0.1:1334/api/wasm.wasm:wasm-function[23021]:0xadf6c0)
    at rust_begin_unwind (http://127.0.0.1:1334/api/wasm.wasm:wasm-function[19703]:0xabd809)
    at core::panicking::panic_fmt::hb02133958c1e7d35 (http://127.0.0.1:1334/api/wasm.wasm:wasm-function[19807]:0xabf26f)
    at core::ops::function::Fn::call::haeff594665bcafdb (http://127.0.0.1:1334/api/wasm.wasm:wasm-function[12532]:0x9e40e6)
    at wgpu::backend::direct::ErrorSinkRaw::handle_error::hbde96cf3f5004626 (http://127.0.0.1:1334/api/wasm.wasm:wasm-function[8417]:0x8d4a27)


imports.wbg.__wbg_error_09919627ac0992f5 @ wasm.js:418
wasm.wasm:0xafab7b Uncaught RuntimeError: unreachable
    at __rust_start_panic (wasm.wasm:0xafab7b)
    at rust_panic (wasm.wasm:0xad0e9e)
    at std::panicking::rust_panic_with_hook::he2a025723e105e28 (wasm.wasm:0x9ab19d)
    at std::panicking::begin_panic_handler::{{closure}}::hd9f8c213ec91b9d5 (wasm.wasm:0xa2dd9b)
    at std::sys_common::backtrace::__rust_end_short_backtrace::h6efd730283875809 (wasm.wasm:0xadf6c0)
    at rust_begin_unwind (wasm.wasm:0xabd809)
    at core::panicking::panic_fmt::hb02133958c1e7d35 (wasm.wasm:0xabf26f)
    at core::ops::function::Fn::call::haeff594665bcafdb (wasm.wasm:0x9e40e6)
    at wgpu::backend::direct::ErrorSinkRaw::handle_error::hbde96cf3f5004626 (wasm.wasm:0x8d4a27)
    at <wgpu::backend::direct::Context as wgpu::Context>::device_create_render_pipeline::h40e092eb7425341b (wasm.wasm:0x2786dc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-BugAn unexpected or incorrect behaviorO-WebSpecific to web (WASM) builds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions