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

Example panics on large window size #85

Closed
rukai opened this issue Mar 10, 2024 · 1 comment · Fixed by #98
Closed

Example panics on large window size #85

rukai opened this issue Mar 10, 2024 · 1 comment · Fixed by #98

Comments

@rukai
Copy link

rukai commented Mar 10, 2024

When I run the example on my machine I get this panic:

~2/Projects/Crates/glyphon> cargo run --example hello-world
    Finished dev [unoptimized + debuginfo] target(s) in 0.07s
     Running `target/debug/examples/hello-world`
thread 'main' panicked at /home/rukai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.3/src/backend/wgpu_core.rs:724:18:
Error in Surface::configure: Validation Error

Caused by:
    `Surface` width and height must be within the maximum supported texture size. Requested was (1276, 2119), maximum extent is 2048.

stack backtrace:
   0: rust_begin_unwind
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
   2: wgpu::backend::wgpu_core::ContextWgpuCore::handle_error_fatal
             at /home/rukai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.3/src/backend/wgpu_core.rs:283:9
   3: <wgpu::backend::wgpu_core::ContextWgpuCore as wgpu::context::Context>::surface_configure
             at /home/rukai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.3/src/backend/wgpu_core.rs:724:13
   4: <T as wgpu::context::DynContext>::surface_configure
             at /home/rukai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.3/src/context.rs:2124:9
   5: wgpu::Surface::configure
             at /home/rukai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.3/src/lib.rs:4818:9
   6: hello_world::run::{{closure}}::{{closure}}
             at ./examples/hello-world.rs:94:25
   7: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:294:13
   8: winit::platform_impl::platform::x11::EventLoop<T>::drain_events::{{closure}}
             at /home/rukai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.14/src/platform_impl/linux/x11/mod.rs:636:25
   9: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:294:13
  10: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:294:13
  11: winit::platform_impl::platform::x11::event_processor::EventProcessor<T>::configure_notify
             at /home/rukai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.14/src/platform_impl/linux/x11/event_processor.rs:778:13
  12: winit::platform_impl::platform::x11::event_processor::EventProcessor<T>::process_xevent
             at /home/rukai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.14/src/platform_impl/linux/x11/event_processor.rs:169:38
  13: winit::platform_impl::platform::x11::event_processor::EventProcessor<T>::process_event
             at /home/rukai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.14/src/platform_impl/linux/x11/event_processor.rs:80:9
  14: winit::platform_impl::platform::x11::EventLoop<T>::drain_events
             at /home/rukai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.14/src/platform_impl/linux/x11/mod.rs:626:13
  15: winit::platform_impl::platform::x11::EventLoop<T>::single_iteration
             at /home/rukai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.14/src/platform_impl/linux/x11/mod.rs:557:9
  16: winit::platform_impl::platform::x11::EventLoop<T>::pump_events
             at /home/rukai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.14/src/platform_impl/linux/x11/mod.rs:441:13
  17: winit::platform_impl::platform::x11::EventLoop<T>::run_on_demand
             at /home/rukai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.14/src/platform_impl/linux/x11/mod.rs:408:19
  18: winit::platform_impl::platform::EventLoop<T>::run_on_demand
             at /home/rukai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.14/src/platform_impl/linux/mod.rs:829:56
  19: winit::platform_impl::platform::EventLoop<T>::run
             at /home/rukai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.14/src/platform_impl/linux/mod.rs:822:9
  20: winit::event_loop::EventLoop<T>::run
             at /home/rukai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.14/src/event_loop.rs:249:9
  21: hello_world::run::{{closure}}
             at ./examples/hello-world.rs:83:5
  22: pollster::block_on
             at /home/rukai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pollster-0.3.0/src/lib.rs:128:15
  23: hello_world::main
             at ./examples/hello-world.rs:21:5
  24: core::ops::function::FnOnce::call_once
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

My machine is running arch linux with i3 wm.
Since its using i3, the example automatically fills up the entire monitor height when launched.
Even for non-i3 users, they could trigger this issue by resizing the window to fill more of their monitor.

@PWhiddy
Copy link

PWhiddy commented Mar 16, 2024

Try changing the limits from downlevel to Limits::default() ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants