The game always crashes when resuming from sleep mode.
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version and features
0.17+
## Relevant system information
```ignore
windows11
`AdapterInfo { name: "NVIDIA GeForce RTX 4080 Laptop GPU", vendor: 4318, device: 10144, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "581.57", backend: Vulkan }`
```
## What you did
resuming from sleep mode.
## What went wrong
crashes
## Additional information
```log
2025-11-05T13:46:40.111244Z INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA GeForce RTX 4080 Laptop GPU", vendor: 4318, device: 10144, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "581.57", backend: Vulkan }
2025-11-05T13:46:41.647082Z INFO bevy_render::batching::gpu_preprocessing: GPU preprocessing is fully supported on this device.
2025-11-05T13:46:41.653338Z INFO bevy_winit::system: Creating new window sprite (0v0)
an error occurred on output stream: The requested device is no longer available. For example, it has been unplugged.
thread 'Compute Task Pool (12)' (28300) panicked at crates\bevy_render\src\view\window\mod.rs:270:17:
Couldn't get swap chain texture, operation unrecoverable: Acquiring a texture failed with a generic error. Check error callbacks for more information
stack backtrace:
0: std::panicking::panic_handler
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\std\src\panicking.rs:698
1: core::panicking::panic_fmt
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\core\src\panicking.rs:75
2: bevy_render::view::window::prepare_windows
3: as bevy_ecs::system::system::System>::run_unsafe
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Encountered a panic in system `Enable the debug feature to see the name`!
thread 'Compute Task Pool (18)' (6528) panicked at bevy\crates\bevy_render\src\render_resource\uniform_buffer.rs:312:18:
called `Option::unwrap()` on a `None` value
stack backtrace:
0: std::panicking::panic_handler
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\std\src\panicking.rs:698
1: core::panicking::panic_fmt
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\core\src\panicking.rs:75
2: core::panicking::panic
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\core\src\panicking.rs:145
3: core::option::unwrap_failed
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\core\src\option.rs:2169
4: bevy_pbr::render::fog::prepare_fog
5: as bevy_ecs::system::system::System>::run_unsafe
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'Compute Task Pool (21)' (34712) panicked at bevy\crates\bevy_render\src\render_resource\uniform_buffer.rs:312:18:
called `Option::unwrap()` on a `None` value
Encountered a panic in system `stack backtrace:
Enable the debug feature to see the name `!
0: std::panicking::panic_handler
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\std\src\panicking.rs:698
1: core::panicking::panic_fmt
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\core\src\panicking.rs:75
2: core::panicking::panic
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\core\src\panicking.rs:145
3: core::option::unwrap_failed
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\core\src\option.rs:2169
4: bevy_pbr::light_probe::prepare_environment_uniform_buffer
5: as bevy_ecs::system::system::System>::run_unsafe
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' (27952) panicked at bevy\crates\bevy_render\src\render_resource\uniform_buffer.rs:312:18:
called `Option::unwrap()` on a `None` value
Encountered a panic in system `stack backtrace:
Enable the debug feature to see the name`!
0: std::panicking::panic_handler
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\std\src\panicking.rs:698
1: core::panicking::panic_fmt
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\core\src\panicking.rs:75
2: core::panicking::panic
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\core\src\panicking.rs:145
3: core::option::unwrap_failed
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\core\src\option.rs:2169
4: core::ops::function::impls:: for &mut F>::call_mut
5: as bevy_ecs::system::system::System>::run_unsafe
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'Compute Task Pool (12)' (28300) panicked at bevy\crates\bevy_render\src\render_resource\uniform_buffer.rs:312:18:
called `Option::unwrap()` on a `None` value
stack backtrace:
Encountered a panic in system ` Enable the debug feature to see the name `!
0: std::panicking::panic_handler
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\std\src\panicking.rs:698
1: core::panicking::panic_fmt
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\core\src\panicking.rs:75
2: core::panicking::panic
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\core\src\panicking.rs:145
3: core::option::unwrap_failed
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\core\src\option.rs:2169
4: bevy_pbr::ssr::prepare_ssr_settings
5: as bevy_ecs::system::system::System>::run_unsafe
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'Compute Task Pool (4)' (13776) panicked at crates\bevy_render\src\render_resource\uniform_buffer.rs:312:18:
called `Option::unwrap()` on a `None` value
stack backtrace:
Encountered a panic in system ` Enable the debug feature to see the name `!
0: std::panicking::panic_handler
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\std\src\panicking.rs:698
1: core::panicking::panic_fmt
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\core\src\panicking.rs:75
2: core::panicking::panic
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\core\src\panicking.rs:145
3: core::option::unwrap_failed
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library\core\src\option.rs:2169
4: bevy_render::view::prepare_view_uniforms
5: as bevy_ecs::system::system::System>::initialize
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Encountered a panic in system `Enable the debug feature to see the name`!
Process finished with exit code 0
```
Contributor guide
Research direction
Start by reproducing the Windows 11 sleep/resume case with Bevy 0.17+ and the reported Vulkan adapter, then inspect crates/bevy_render/src/view/window/mod.rs and crates/bevy_render/src/render_resource/uniform_buffer.rs. Review the reported bevy_pbr systems that panic after the output device becomes unavailable. Done means resuming from sleep no longer crashes or panics in these paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100