{"record":{"id":"9316ecddbe570e7f","repo":"slint-ui/slint","slug":"slint-testing-use-native-popup-called-without-test","errorCode":null,"errorMessage":"slint_testing_use_native_popup called without testing backend/adapter","messagePattern":"slint_testing_use_native_popup called without testing backend/adapter","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/backends/testing/ffi.rs","lineNumber":82,"sourceCode":"}\n\n#[unsafe(no_mangle)]\npub extern \"C\" fn slint_send_keyboard_string_sequence(\n    sequence: &SharedString,\n    window_adapter: &WindowAdapterRc,\n) {\n    crate::testing_backend::send_keyboard_string_sequence(sequence, window_adapter);\n}\n\n#[unsafe(no_mangle)]\npub extern \"C\" fn slint_testing_use_native_popup(window_adapter: &WindowAdapterRc, native: bool) {\n    window_adapter\n        .internal(i_slint_core::InternalToken)\n        .and_then(|wa| {\n            (wa as &dyn core::any::Any).downcast_ref::<crate::testing_backend::TestingWindow>()\n        })\n        .map(|testing_window| testing_window.use_native_popup(native))\n        .expect(\"slint_testing_use_native_popup called without testing backend/adapter\");\n}\n\n#[unsafe(no_mangle)]\npub extern \"C\" fn slint_testing_active_popup_count(window_adapter: &WindowAdapterRc) -> usize {\n    WindowInner::from_pub(window_adapter.window()).active_popups().len()\n}\n\n#[unsafe(no_mangle)]\npub unsafe extern \"C\" fn slint_testing_element_visit_elements(\n    root: &ItemTreeRc,\n    user_data: *mut c_void,\n    visitor: unsafe extern \"C\" fn(*mut c_void, &ElementHandle) -> bool,\n) -> bool {\n    RootWrapper(root)\n        .root_element()\n        .query_descendants()\n        .match_predicate(move |element| unsafe { visitor(user_data, element) })\n        .find_first()","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/slint-ui/slint/blob/3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016/internal/backends/testing/ffi.rs#L64-L100","documentation":"Error \"slint_testing_use_native_popup called without testing backend/adapter\" thrown in slint-ui/slint.","triggerScenarios":"Thrown at internal/backends/testing/ffi.rs:82 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Initialize the testing backend before calling slint_testing_use_native_popup.","Ensure the testing adapter exists in the current window."],"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-14T00:17:10.932Z"}