{"record":{"id":"c44009771938f226","repo":"slint-ui/slint","slug":"c-nativewindowhandle-created-with-null-xcb-wind","errorCode":null,"errorMessage":"C++: NativeWindowHandle created with null xcb window handle","messagePattern":"C\\+\\+: NativeWindowHandle created with null xcb window handle","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"api/cpp/platform.rs","lineNumber":814,"sourceCode":"            RawDisplayHandle::Windows(raw_window_handle::WindowsDisplayHandle::new()),\n        ));\n        Box::into_raw(Box::new(handle)) as CppRawHandleOpaque\n    }\n\n    #[unsafe(no_mangle)]\n    pub unsafe extern \"C\" fn slint_new_raw_window_handle_x11_xcb(\n        window: u32,\n        visual_id: u32,\n        connection: *mut c_void,\n        screen: core::ffi::c_int,\n    ) -> CppRawHandleOpaque {\n        use raw_window_handle::{XcbDisplayHandle, XcbWindowHandle};\n        let handle = CppRawHandle::from((\n            RawWindowHandle::Xcb({\n                let mut hnd = XcbWindowHandle::new(\n                    window\n                        .try_into()\n                        .expect(\"C++: NativeWindowHandle created with null xcb window handle\"),\n                );\n                hnd.visual_id = visual_id.try_into().ok();\n                hnd\n            }),\n            RawDisplayHandle::Xcb(XcbDisplayHandle::new(\n                core::ptr::NonNull::new(connection),\n                screen,\n            )),\n        ));\n        Box::into_raw(Box::new(handle)) as CppRawHandleOpaque\n    }\n\n    #[unsafe(no_mangle)]\n    pub unsafe extern \"C\" fn slint_new_raw_window_handle_x11_xlib(\n        window: core::ffi::c_ulong,\n        visual_id: core::ffi::c_ulong,\n        display: *mut c_void,\n        screen: core::ffi::c_int,","sourceCodeStart":796,"sourceCodeEnd":832,"githubUrl":"https://github.com/slint-ui/slint/blob/3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016/api/cpp/platform.rs#L796-L832","documentation":"Error \"C++: NativeWindowHandle created with null xcb window handle\" thrown in slint-ui/slint.","triggerScenarios":"Thrown at api/cpp/platform.rs:814 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Do not create a NativeWindowHandle with a null XCB window handle.","Obtain a valid X11 window id before calling."],"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"}