Fix crash on maximize: switch eframe to wgpu (Vulkan) renderer
Maximizing the window crashed the GUI immediately with:
Error: Glutin(Error { raw_code: Some(12291), kind: OutOfMemory })
12291 is EGL_BAD_ALLOC. The default eframe `glow` (OpenGL) renderer
fails to reallocate its surface when the window resizes to maximized
dimensions on NVIDIA + Wayland — a well-known fragility of NVIDIA's
GL-on-Wayland path. It surfaces as a clean Err from run_native (not a
panic), which is why nothing landed in yt-offline.crash.log.
Switch to the wgpu (Vulkan) renderer, which reconfigures the swapchain
cleanly on resize:
- Cargo.toml: drop eframe's default glow feature, enable wgpu, keep
accesskit / default_fonts / wayland / x11.
- main.rs: NativeOptions.renderer = Renderer::Wgpu.
Verified on the NVIDIA GTX 1650 SUPER + Wayland session that triggered
the crash: app launches and maximizes cleanly, no EGL error.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
a71a193879
commit
5cb011a13d
3 changed files with 21 additions and 123 deletions
|
|
@ -78,6 +78,10 @@ fn main() -> eframe::Result<()> {
|
|||
.with_inner_size([1280.0, 820.0])
|
||||
.with_min_inner_size([800.0, 500.0])
|
||||
.with_title("yt-offline"),
|
||||
// Force the wgpu (Vulkan) renderer. The default glow/OpenGL path
|
||||
// crashes on NVIDIA + Wayland when the window is maximized
|
||||
// (Glutin EGL_BAD_ALLOC). wgpu reconfigures the swapchain cleanly.
|
||||
renderer: eframe::Renderer::Wgpu,
|
||||
..Default::default()
|
||||
};
|
||||
eframe::run_native(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue