-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Hang when resizing the window on Windows with an integrated graphics card #20141
Copy link
Copy link
Open
Labels
A-WindowingPlatform-agnostic interface layer to run your app inPlatform-agnostic interface layer to run your app inC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorC-Machine-SpecificThis bug is isolated to specific hardware or driver configurationsThis bug is isolated to specific hardware or driver configurationsI-CrashA sudden unexpected crashA sudden unexpected crashO-WindowsSpecific to the Windows desktop operating systemSpecific to the Windows desktop operating systemS-Needs-InvestigationThis issue requires detective work to figure out what's going wrongThis issue requires detective work to figure out what's going wrong
Description
Activity
Metadata
Metadata
Assignees
Labels
A-WindowingPlatform-agnostic interface layer to run your app inPlatform-agnostic interface layer to run your app inC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorC-Machine-SpecificThis bug is isolated to specific hardware or driver configurationsThis bug is isolated to specific hardware or driver configurationsI-CrashA sudden unexpected crashA sudden unexpected crashO-WindowsSpecific to the Windows desktop operating systemSpecific to the Windows desktop operating systemS-Needs-InvestigationThis issue requires detective work to figure out what's going wrongThis issue requires detective work to figure out what's going wrong
Bevy version
Current
main(8777dd4).Relevant system information
Windows 11
What you did
Ran a Bevy project and resized the window.
What went wrong
While resizing the application window, the program freezes up completely and crashes. This problem occurs on every run but may take repeated resizing before it shows up. This is occurring in my application along with the basic Bevy 3d Scene example.
Additional information
I bisected this and found the problem is introduced in 8122b35.
It seems like the issue is within
WinitAppRunnerState::about_to_wait()whereself.redraw_requested(event_loop)is always called for non-Windows platforms (where I assume the freezing does not occur), but there is unique, problematic logic for Windows that is causingself.redraw_requested(event_loop)to NOT be called enough.The code causing this resize crash is also causing at least one related problem (and possibly others). See #19030 and my related PR #19772 where there is a freeze occurring during drag-and-drop events—the PR fix just ensures that
self.redraw_requested(event_loop)runs during a drag-and-drop event.This issue (along with #19030) can be fixed with the following code changes. That said, I'm not familiar with the reasons for the current code, and this may cause other problems that the existing Windows-specific code was meant to fix.
Other related issues per code comments: #17488 and #18027.
bevy_winit/src/state.rslines 457-469bevy_winit/src/state.rslines 519-539self.redraw_requested(event_loop)like occurs on non-Windows platformsExample of Crash
Bevy.Resize.Crash_20250714.mp4