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
|
|
@ -10,7 +10,12 @@ authors = ["InannaBeloved <anassaeneroi@pm.me>"]
|
|||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
eframe = "0.29"
|
||||
# Use the wgpu (Vulkan/Metal/DX) renderer instead of the default glow
|
||||
# (OpenGL) one. NVIDIA + Wayland crashes the GL surface on window resize
|
||||
# (Glutin EGL_BAD_ALLOC / OutOfMemory on maximize); wgpu's Vulkan path
|
||||
# reconfigures the swapchain cleanly. We drop the `glow` default feature
|
||||
# and keep the rest (accesskit, fonts, wayland, x11).
|
||||
eframe = { version = "0.29", default-features = false, features = ["accesskit", "default_fonts", "wayland", "x11", "wgpu"] }
|
||||
image = { version = "0.25", default-features = false, features = ["webp", "jpeg", "png"] }
|
||||
toml = "0.8"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue