bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Bevy website example crashes with Dimension X value 4480 exceeds the limit of 4096

Open miketwenty1 opened this issue 2 years ago • 2 comments

Bevy version

All recent versions including main branch.

[Optional] Relevant system information

  • Doesn't work on pixel 6 pro specifically. Latest version of chrome/brave/chromium won't load app with bug. Firefox is able to load without the crash.

render-related bug:

`AdapterInfo { name: "ANGLE (ARM, Mali-G78, OpenGL ES 3.2)", vendor: 5045, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Gl }`

What you did

Load any example on chrome webbrowser from bevyengine examples while using Pixel 6 Pro.

What went wrong

  • what were you expecting? Load example

  • what actually happened? Crashes

Additional information

Other information that can be used to further reproduce or isolate the problem. This commonly includes:

  • screenshots (While using USB Debugger to see console logs) Screenshot 2023-07-03 at 11 44 34 AM

  • logs

INFO crates/bevy_winit/src/system.rs:51 Creating new window "Bevy App" (0v0)
sprite.js:376 INFO crates/bevy_render/src/renderer/mod.rs:128 AdapterInfo { name: "ANGLE (ARM, Mali-G78, OpenGL ES 3.2)", vendor: 5045, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Gl }
sprite.js:376 ERROR  Handling wgpu errors as fatal by default log.target = "wgpu::backend::direct";log.module_path = "wgpu::backend::direct";log.file = "/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.15.1/src/backend/direct.rs";log.line = 3023;
panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_texture
      note: label = `main_texture_a`
    Dimension X value 4480 exceeds the limit of 4096

', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.15.1/src/backend/direct.rs:3024:5

Stack:

Error
    at imports.wbg.__wbg_new_abda76e883ba8a5f (https://bevyengine.org/examples/2d/sprite/sprite.js:401:21)
    at console_error_panic_hook::hook::hcbf7b0d060855d14 (wasm://wasm/05a23a2a:wasm-function[9990]:0xb4b1ec)
    at core::ops::function::Fn::call::hea8b08d2c030c3ec (wasm://wasm/05a23a2a:wasm-function[46754]:0xf2d07b)
    at std::panicking::rust_panic_with_hook::h85b7f6628c291e12 (wasm://wasm/05a23a2a:wasm-function[16793]:0xd66164)
    at std::panicking::begin_panic_handler::{{closure}}::h1e17bad04a5713a4 (wasm://wasm/05a23a2a:wasm-function[18899]:0xdcb5b4)
    at std::sys_common::backtrace::__rust_end_short_backtrace::h63adae5c31458c4b (wasm://wasm/05a23a2a:wasm-function[46124]:0xf2b730)
    at rust_begin_unwind (wasm://wasm/05a23a2a:wasm-function[24217]:0xe7cd89)
    at core::panicking::panic_fmt::hf5c4cd929d4aaa9e (wasm://wasm/05a23a2a:wasm-function[27654]:0xebfb14)
    at core::ops::function::Fn::call::h89018be5ad17537a (wasm://wasm/05a23a2a:wasm-function[16817]:0xd676ce)
    at wgpu::backend::direct::ErrorSinkRaw::handle_error::h736d6c0781432ed7 (wasm://wasm/05a23a2a:wasm-function[11998]:0xc17b08)
    
    

  | imports.wbg.__wbg_error_f851667af71bcfc6 | @ | sprite.js:417
-- | -- | -- | --
  | $console_error_panic_hook::hook::hcbf7b0d060855d14 | @ | 05a23a2a:0xb4b2cd
  | $core::ops::function::Fn::call::hea8b08d2c030c3ec | @ | 05a23a2a:0xf2d07b
  | $std::panicking::rust_panic_with_hook::h85b7f6628c291e12 | @ | 05a23a2a:0xd66164
  | $std::panicking::begin_panic_handler::{{closure}}::h1e17bad04a5713a4 | @ | 05a23a2a:0xdcb5b4
  | $std::sys_common::backtrace::__rust_end_short_backtrace::h63adae5c31458c4b | @ | 05a23a2a:0xf2b730
  | $rust_begin_unwind | @ | 05a23a2a:0xe7cd89
  | $core::panicking::panic_fmt::hf5c4cd929d4aaa9e | @ | 05a23a2a:0xebfb14
  | $core::ops::function::Fn::call::h89018be5ad17537a | @ | 05a23a2a:0xd676ce
  | $wgpu::backend::direct::ErrorSinkRaw::handle_error::h736d6c0781432ed7 | @ | 05a23a2a:0xc17b08
  | $<wgpu::backend::direct::Context as wgpu::context::Context>::device_create_texture::ha50a829a64dd71fb | @ | 05a23a2a:0x477941
  | $<T as wgpu::context::DynContext>::device_create_texture::h6240201a76bb1b90 | @ | 05a23a2a:0xdca833
  | $wgpu::Device::create_texture::h26f299fd9d8a3003 | @ | 05a23a2a:0xc59275
  | $bevy_render::texture::texture_cache::TextureCache::get::hf253357a6b24500c | @ | 05a23a2a:0x2bd33d
  | $core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut::h1cf2dfe27a8d9a02 | @ | 05a23a2a:0x206777
  | $bevy_ecs::system::system::System::run::h328e9a0890afed80 | @ | 05a23a2a:0x442f95
  | $<bevy_ecs::schedule::executor::single_threaded::SingleThreadedExecutor as bevy_ecs::schedule::executor::SystemExecutor>::run::hbc7a9d42b6ae4d0c | @ | 05a23a2a:0x356b42
  | $bevy_ecs::world::World::run_schedule_ref::h457034b4cf217879 | @ | 05a23a2a:0x276e70
  | $<bevy_ecs::system::exclusive_function_system::ExclusiveFunctionSystem<Marker,F> as bevy_ecs::system::system::System>::run::h9aef96d7ee1a0438 | @ | 05a23a2a:0xe5d72a
  | $<bevy_ecs::schedule::executor::single_threaded::SingleThreadedExecutor as bevy_ecs::schedule::executor::SystemExecutor>::run::hbc7a9d42b6ae4d0c | @ | 05a23a2a:0x356b42
  | $bevy_ecs::world::World::run_schedule_ref::h457034b4cf217879 | @ | 05a23a2a:0x276e70
  | $bevy_app::app::App::update::h3a9cbfcf4cf6e227 | @ | 05a23a2a:0xce7c37
  | $winit::platform_impl::platform::event_loop::EventLoop<T>::spawn::{{closure}}::h97d6482b337db46b | @ | 05a23a2a:0xf246a
  | $winit::platform_impl::platform::event_loop::runner::Shared<T>::handle_event::h376ffa00a42649bb | @ | 05a23a2a:0x6193a8
  | $winit::platform_impl::platform::event_loop::runner::Shared<T>::set_listener::hb13a79f25ffb7ad4 | @ | 05a23a2a:0x4ee7ae
  | $winit::platform_impl::platform::event_loop::EventLoop<T>::spawn::hcd2edeb889706e5e | @ | 05a23a2a:0xd0192b
  | $winit::platform_impl::platform::event_loop::EventLoop<T>::run::hc84d22f24801e750 | @ | 05a23a2a:0xedf9ee
  | $bevy_winit::run::h91a1ca0ef4348bc9 | @ | 05a23a2a:0xf23394
  | $bevy_winit::winit_runner::h1d37625b18f1c7df | @ | 05a23a2a:0x284e0e
  | $core::ops::function::Fn::call::h0aaa962e3a946bc2 | @ | 05a23a2a:0xed97d8
  | $bevy_app::app::App::run::h240999634d907209 | @ | 05a23a2a:0x9b7776
  | $sprite::main::h2961d5ca25b080d5 | @ | 05a23a2a:0x33ca1a
  | $std::sys_common::backtrace::__rust_begin_short_backtrace::h03346eba6f335f05 | @ | 05a23a2a:0xf2b7a0
  | $std::rt::lang_start::{{closure}}::h0e9df78b0d1ebf16 | @ | 05a23a2a:0xecbdc7
  | $std::rt::lang_start_internal::h74fcf0f0f75355d6 | @ | 05a23a2a:0xc2d676
  | $main | @ | 05a23a2a:0xec512b
  | $__wbindgen_start | @ | 05a23a2a:0xf23323
  | __wbg_finalize_init | @ | sprite.js:1868
  | __wbg_init | @ | sprite.js:1904
  | await in __wbg_init (async) |   |  
  | (anonymous) | @ | (index):296

bevyengine.org/:1 [.WebGL-0x2022d8600] GL_INVALID_VALUE: Desired resource size is greater than max texture size.
  • theories about what might be going wrong (I think)** Bevy is trying to make a texture of 4480 which is higher than the max that can be supported by the wgpu**

miketwenty1 avatar Jul 03 '23 15:07 miketwenty1

the size asked for is 1280, I think the pixel 6 pro as a scale factor of 3.5 which gives... 4480

mockersf avatar Jul 03 '23 20:07 mockersf

@mockersf is there anyway to override this or fix this?

I'm thinking we can consolidate this and https://github.com/bevyengine/bevy/issues/7038? Maybe consolidated with https://github.com/bevyengine/bevy/issues/4869, https://github.com/bevyengine/bevy/issues/7591 as well?

miketwenty1 avatar Jan 14 '24 03:01 miketwenty1