linebender / linebender/vello

`with_winit` example panics when resizing on linux

Open
#1,793 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
4.3k
Forks
300
Avg merge
2d 13h
Merged PRs (30d)
61

Description

`cargo run -p with_winit` panics with the following backtrace when resizing the window. I'm on wayland, but the backtrace indicates the application ends up with x11.
```
Parsed svg Ghostscript_Tiger in 10.519153ms
Encoded svg Ghostscript_Tiger in 1.109533ms
[2026-08-03T03:48:37.554Z ERROR wgpu::backend::wgpu_core] Handling wgpu errors as fatal by default

thread 'main' (35767) panicked at /home/alaska/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-29.0.3/src/backend/wgpu_core.rs:3879:18:
wgpu error: Validation Error

Caused by:
In Surface::configure
`SurfaceOutput` must be dropped before a new `Surface` is made

stack backtrace:
0: __rustc::rust_begin_unwind
at /rustc/31fca3adb283cc9dfd56b49cdee9a96eb9c96ffd/library/std/src/panicking.rs:689:5
1: core::panicking::panic_fmt
at /rustc/31fca3adb283cc9dfd56b49cdee9a96eb9c96ffd/library/core/src/panicking.rs:80:14
2: wgpu::backend::wgpu_core::default_error_handler
at /home/alaska/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-29.0.3/src/backend/wgpu_core.rs:687:5
3: wgpu::backend::wgpu_core::ErrorSinkRaw::handle_error_or_return_handler
at /home/alaska/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-29.0.3/src/backend/wgpu_core.rs:671:21
4: wgpu::backend::wgpu_core::ContextWgpuCore::handle_error_inner
at /home/alaska/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-29.0.3/src/backend/wgpu_core.rs:299:18
5: wgpu::backend::wgpu_core::ContextWgpuCore::handle_error_nolabel
at /home/alaska/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-29.0.3/src/backend/wgpu_core.rs:332:14
6: ::configure
at /home/alaska/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-29.0.3/src/backend/wgpu_core.rs:3879:18
7: wgpu::api::surface::Surface::configure
at /home/alaska/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-29.0.3/src/api/surface.rs:96:20
8: vello::util::RenderContext::configure_surface
at ./vello/src/util.rs:140:25
9: >::window_event
at ./examples/with_winit/src/lib.rs:638:38
10: winit::event_loop::dispatch_event_for_app
at /home/alaska/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.13/src/event_loop.rs:642:56
11: winit::event_loop::EventLoop::run_app::{{closure}}
at /home/alaska/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.13/src/event_loop.rs:265:49
12: core::ops::function::impls:: for &mut F>::call_mut
at /home/alaska/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:298:21
13: core::ops::function::impls:: for &mut F>::call_mut
at /home/alaska/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:298:21
14: winit::platform_impl::linux::x11::EventLoop::single_iteration
at /home/alaska/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.13/src/platform_impl/linux/x11/mod.rs:564:17
15: winit::platform_impl::linux::x11::EventLoop::poll_events_with_timeout
at /home/alaska/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.13/src/platform_impl/linux/x11/mod.rs:505:14
16: winit::platform_impl::linux::x11::EventLoop::pump_events
at /home/alaska/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.13/src/platform_impl/linux/x11/mod.rs:424:18
17: winit::platform_impl::linux::x11::EventLoop::run_on_demand
at /home/alaska/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.13/src/platform_impl/linux/x11/mod.rs:385:24
18: winit::platform_impl::linux::EventLoop::run_on_demand
at /home/alaska/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.13/src/platform_impl/linux/mod.rs:820:61
19: winit::platform_impl::linux::EventLoop::run
at /home/alaska/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.13/src/platform_impl/linux/mod.rs:813:14
20: winit::event_loop::EventLoop::run_app
at /home/alaska/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.13/src/event_loop.rs:265:25
21: with_winit::run
at ./examples/with_winit/src/lib.rs:876:16
22: with_winit::main
at ./examples/with_winit/src/lib.rs:957:13
23: with_winit_bin::main
at ./examples/with_winit/src/main.rs:11:9
24: core::ops::function::FnOnce::call_once
at /home/alaska/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run `cargo run -p with_winit` and reproduce the panic by resizing the window. Start in `examples/with_winit/src/lib.rs` around line 638, then inspect `vello/src/util.rs` around line 140 where the surface is configured. Done means resizing the Linux window no longer panics with the reported `SurfaceOutput` validation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.