[GH-ISSUE #5353] Crash: Surface is not configured for presentation in draw_frame #1647

Closed
opened 2026-11-02 15:48:37 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @nxtime on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5353

Originally assigned to: @rdbtCVS on GitHub.

Crash: panic in Renderer::draw_frame, seen once, not reproduced yet.

wgpu-30.0.1/src/backend/wgpu_core.rs:4036
Error in Surface::get_current_texture_view: Validation Error
Caused by: Surface is not configured for presentation
handle_error_fatal < CoreSurface::get_current_texture < Renderer::draw_frame < Renderer::render < Game::render < window_event

Setup: native build fca2169, Windows 11 26100, RTX 4070 SUPER, NVIDIA 610.74, Vulkan, windowed 2560x1369, VSync off, Complementary Reimagined shader pack, HDR screenshots on.

When: in a world, about 9 s after a game-control screenshot, while leaving Options > Mods with Done. Nothing was logged before the panic.

Reading of the code (not confirmed at runtime): wgpu takes handle_error_fatal here only when the surface has no error_sink, and that sink is set only by a successful Surface::configure. So this surface never configured successfully, which points at a fresh surface from recreate_surface() (gfx.rs:3073, after Lost or Validation) whose configure failed. A previously configured surface reports CurrentSurfaceTexture::Validation and recovers at gfx.rs:4041, but a recreated one skips that and takes the game down.

Possible fix: have recreate_surface check that configure worked (error scope) and retry on a later frame, rather than storing a surface the next get_current_texture panics on.

Unknown: what lost the original surface. On the same machine a separate GPU app closed a few minutes later, with no driver reset in the event log.

Originally created by @nxtime on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5353 Originally assigned to: @rdbtCVS on GitHub. **Crash:** panic in `Renderer::draw_frame`, seen once, not reproduced yet. ``` wgpu-30.0.1/src/backend/wgpu_core.rs:4036 Error in Surface::get_current_texture_view: Validation Error Caused by: Surface is not configured for presentation handle_error_fatal < CoreSurface::get_current_texture < Renderer::draw_frame < Renderer::render < Game::render < window_event ``` **Setup:** native build `fca2169`, Windows 11 26100, RTX 4070 SUPER, NVIDIA 610.74, Vulkan, windowed 2560x1369, VSync off, Complementary Reimagined shader pack, HDR screenshots on. **When:** in a world, about 9 s after a game-control `screenshot`, while leaving Options > Mods with Done. Nothing was logged before the panic. **Reading of the code (not confirmed at runtime):** wgpu takes `handle_error_fatal` here only when the surface has no `error_sink`, and that sink is set only by a successful `Surface::configure`. So this surface never configured successfully, which points at a fresh surface from `recreate_surface()` (`gfx.rs:3073`, after `Lost` or `Validation`) whose configure failed. A previously configured surface reports `CurrentSurfaceTexture::Validation` and recovers at `gfx.rs:4041`, but a recreated one skips that and takes the game down. **Possible fix:** have `recreate_surface` check that configure worked (error scope) and retry on a later frame, rather than storing a surface the next `get_current_texture` panics on. **Unknown:** what lost the original surface. On the same machine a separate GPU app closed a few minutes later, with no driver reset in the event log.
Author
Owner

@rdbtCVS commented on GitHub (Oct 31, 2026):

/claim

<!-- gh-comment-id:6550618779 --> @rdbtCVS commented on GitHub (Oct 31, 2026): /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1647
No description provided.