{"record":{"id":"8f388252bc71a05d","repo":"slint-ui/slint","slug":"unable-to-quit-event-loop-multiple-times","errorCode":null,"errorMessage":"Unable to quit event loop multiple times","messagePattern":"Unable to quit event loop multiple times","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/backends/linuxkms/calloop_backend/input.rs","lineNumber":358,"sourceCode":"                    );\n\n                    let control = xkb_key_state\n                        .mod_name_is_active(xkb::MOD_NAME_CTRL, xkb::STATE_MODS_EFFECTIVE);\n                    let alt = xkb_key_state\n                        .mod_name_is_active(xkb::MOD_NAME_ALT, xkb::STATE_MODS_EFFECTIVE);\n\n                    if state == KeyState::Pressed {\n                        //eprintln!(\n                        //\"key {} state {:#?} sym {:x} control {control} alt {alt}\",\n                        //key_code, state, sym\n                        //);\n\n                        if (sym == xkb::Keysym::Delete || sym == xkb::Keysym::BackSpace)\n                            && alt\n                            && control\n                        {\n                            i_slint_core::api::quit_event_loop()\n                                .expect(\"Unable to quit event loop multiple times\");\n                        } else if (xkb::Keysym::XF86_Switch_VT_1..=xkb::Keysym::XF86_Switch_VT_12)\n                            .contains(&sym)\n                        {\n                            // let target_vt = (sym - xkb::KEY_XF86Switch_VT_1 + 1) as i32;\n                            // TODO: eprintln!(\"switch vt {target_vt}\");\n                        }\n                    }\n\n                    if let Some(text) = map_key_sym(sym) {\n                        let event = match state {\n                            KeyState::Pressed => WindowEvent::KeyPressed { text },\n                            KeyState::Released => WindowEvent::KeyReleased { text },\n                        };\n                        window.dispatch_event_with_result(event).map_err(Self::Error::other)?;\n                    }\n                }\n                _ => {}\n            }","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/slint-ui/slint/blob/3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016/internal/backends/linuxkms/calloop_backend/input.rs#L340-L376","documentation":"Error \"Unable to quit event loop multiple times\" thrown in slint-ui/slint.","triggerScenarios":"Thrown at internal/backends/linuxkms/calloop_backend/input.rs:358 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Call the quit function only once per event loop run.","Restructure the code so quit is triggered from a single place."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016","analyzedAt":"2026-08-19T23:23:16.610Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}