bevyengine / bevyengine/bevy

Setting FpsOverlayConfig.FrameTimeGraphConfig.enabled to true causes the application to crash.

Open
#22,544 0 comments 0 reactions 0 assignees View on GitHub
A-Dev-Tools C-Bug D-Modest I-Crash
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

version: 0.18
features: default-features = true, features=["bevy_dev_tools"]

SystemInfo { os: "Windows 10 Enterprise", kernel: "19045", cpu: "Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz", core_count: "4", memory: "15.9 GiB" }

AdapterInfo { name: "NVIDIA GeForce GTX 1050 Ti", vendor: 4318, device: 7298, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "512.15", backend: Vulkan }

Bug Report: When running the fps_overlay example, setting FpsOverlayConfig.FrameTimeGraphConfig.enabled to true causes the application to crash, while setting it to false works fine.

Reproduction Steps:

Run the Bevy fps_overlay example: cargo run --example fps_overlay

Set FpsOverlayConfig.frame_time_graph_config.enabled = true (in code or at runtime)

The application crashes in multi-monitor environments on Windows

Set it to false and the application runs without issues

Additional Context:

Platform: Windows with multiple monitors

Error: "Couldn't get swap chain texture" → "Parent device is lost" → Application crash

Root Cause: The FrameTimeGraphPlugin doesn't check GPU device validity before updating shader storage buffers during multi-monitor transitions

Workaround: Keeping enabled=false prevents the crash but disables the frame time graph feature

Suggested Fix: Add GPU device availability checks in the update_frame_time_values system before calling buffer.set_data().

Contributor guide

Open the contributing guide

Research direction

Start by running `cargo run --example fps_overlay` and inspect the `update_frame_time_values` system and its `buffer.set_data()` call. Reproduce with the frame-time graph enabled on a multi-monitor Windows setup, then verify the example no longer crashes during monitor transitions while the graph remains functional.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.