{"record":{"id":"9a97bcbb04c663ca","repo":"slint-ui/slint","slug":"internal-error-could-not-find-any-matching-gl-configuration","errorCode":null,"errorMessage":"internal error: Could not find any matching GL configuration","messagePattern":"internal error: Could not find any matching GL configuration","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"internal/backends/winit/renderer/femtovg/glcontext.rs","lineNumber":90,"sourceCode":"        // Commented out due to https://github.com/rust-windowing/glutin/issues/1640\n        #[cfg(target_os = \"macos\")]\n        let config_template_builder = config_template_builder.with_transparency(true);\n\n        let display_builder = glutin_winit::DisplayBuilder::new()\n            .with_preference(glutin_winit::ApiPreference::FallbackEgl)\n            .with_window_attributes(Some(window_attributes.clone()));\n        let config_picker = |it: Box<dyn Iterator<Item = glutin::config::Config> + '_>| {\n            it.reduce(|accum, config| {\n                let transparency_check = config.supports_transparency().unwrap_or(false)\n                    & !accum.supports_transparency().unwrap_or(false);\n\n                if transparency_check || config.num_samples() < accum.num_samples() {\n                    config\n                } else {\n                    accum\n                }\n            })\n            .expect(\"internal error: Could not find any matching GL configuration\")\n        };\n        let (window, gl_config) = display_builder\n            .build(active_event_loop, config_template_builder, config_picker)\n            .map_err(|glutin_err| {\n                format!(\n                    \"Error creating OpenGL display ({:?}) with glutin: {}\",\n                    active_event_loop.display_handle(),\n                    glutin_err\n                )\n            })?;\n\n        let gl_display = gl_config.display();\n\n        let raw_window_handle = window\n            .as_ref()\n            .map(|w| w.window_handle())\n            .transpose()\n            .map_err(|err| {","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/slint-ui/slint/blob/3a7e700487dc74d404cad0726378053ab763d4e0/internal/backends/winit/renderer/femtovg/glcontext.rs#L72-L108","documentation":"When creating the glutin/GL display for the femtovg renderer, the config picker iterates framebuffer configurations and must select one. If no configuration matches at all, glutin returned nothing usable and slint panics with this internal-error message.","triggerScenarios":"Running on a system where the GL driver/EGL/GLX exposes no compatible framebuffer configuration: headless servers without GPU, software GL lacking required configs, VMs without 3D acceleration, invalid requested graphics API or transparency requirements that filter out all configs.","commonSituations":"CI containers without a GPU or proper GL drivers (missing libGL/EGL); Wayland/X11 sessions with broken Mesa; running with `SLINT_BACKEND=winit-femtovg` on machines with only GL 1.x; remote X forwarding without GLX.","solutions":["Install/repair GPU drivers or Mesa (libgl1-mesa-dri, libegl1) so at least one framebuffer config is available","Use the software renderer instead: `SLINT_BACKEND=winit-software` (or `--no-default-features` with renderer-software)","If in CI, use xvfb with working GL (xvfb-run + Mesa llvmpipe) or skip GL tests","Check requested graphics API / transparency settings that may over-constrain config selection"],"exampleFix":"// before (forces femtovg in a GPU-less CI)\n$ SLINT_BACKEND=winit-femtovg cargo test\n// after\n$ SLINT_BACKEND=winit-software cargo test","handlingStrategy":"fallback","validationCode":"// shell check before running a GL-backed app in CI\nglxinfo | grep -q 'OpenGL version' || echo 'no usable GL; use software renderer'","typeGuard":null,"tryCatchPattern":"// select renderer via env before slint init\nif std::env::var(\"SLINT_BACKEND\").is_err() && std::env::var(\"CI\").is_ok() {\n    std::env::set_var(\"SLINT_BACKEND\", \"winit-software\");\n}","preventionTips":["Install Mesa/GPU drivers (libgl1, libegl1, mesa-dri) on headless machines","Use SLINT_BACKEND=winit-software in GPU-less CI or VMs","Use xvfb-run with llvmpipe for GL-dependent tests","Avoid over-constraining transparency/sampling requirements that filter out all GL configs"],"tags":["opengl","glutin","renderer","configuration"],"backgroundTag":"unsupported-platform","analyzedSha":"3a7e700487dc74d404cad0726378053ab763d4e0","analyzedAt":"2026-09-16T01:37:20.251Z","contentChangedAt":"2026-09-16T01:37:20.251Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}