-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Panics when window is minimized in Windows 10 #2866
Copy link
Copy link
Closed
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 behaviorO-WindowsSpecific to the Windows desktop operating systemSpecific to the Windows desktop operating systemP-CrashA sudden unexpected crashA sudden unexpected crashS-DuplicateThis issue or PR already existsThis issue or PR already exists
Description
Bevy version
v0.5.0
Operating system & version
Windows 10
What you did
Tried to minimize window
What you expected to happen
Minimizes window
What actually happened
Paniced
thread 'main' panicked at 'Handling wgpu errors as fatal by default'
Sep 25 20:06:36.098 ERROR gpu_descriptor::allocator: `DescriptorAllocator` is dropped while some descriptor sets were not deallocated
Sep 25 20:06:36.133 ERROR gpu_alloc::block: Memory block wasn't deallocated
...
Additional information
In wgpu getting started docs, function for resizing/minimizing was using if statement to check if new window size is 0 or not
pub fn resize(&mut self, new_size: PhysicalSize<u32>) {
if new_size.width > 0 && new_size.height > 0 {
self.size = new_size;
self.surface_config.width = new_size.width;
self.surface_config.height = new_size.height;
self.surface.configure(&self.device, &self.surface_config);
}
}removing the if statement resulted in
thread 'main' panicked at 'Error in Surface::configure: Both `Surface` width and height must be non-zero. Wait to recreate the `Surface` until the window has non-zero area.
Reactions are currently unavailable
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 behaviorO-WindowsSpecific to the Windows desktop operating systemSpecific to the Windows desktop operating systemP-CrashA sudden unexpected crashA sudden unexpected crashS-DuplicateThis issue or PR already existsThis issue or PR already exists