{"record":{"id":"f20d02b95cd9ade7","repo":"zed-industries/zed","slug":"failed-to-create-keymap","errorCode":null,"errorMessage":"Failed to create keymap","messagePattern":"Failed to create keymap","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/gpui_linux/src/linux/wayland/client.rs","lineNumber":1735,"sourceCode":"                state.wl_keyboard = Some(keyboard);\n            }\n            if capabilities.contains(wl_seat::Capability::Pointer) {\n                let pointer = seat.get_pointer(qh, ());\n\n                if let Some(cursor_shape_device) = state.cursor_shape_device.take() {\n                    cursor_shape_device.destroy();\n                }\n\n                state.cursor_shape_device = state\n                    .globals\n                    .cursor_shape_manager\n                    .as_ref()\n                    .map(|cursor_shape_manager| cursor_shape_manager.get_pointer(&pointer, qh, ()));\n\n                state.pinch_gesture = state.globals.gesture_manager.as_ref().map(\n                    |gesture_manager: &zwp_pointer_gestures_v1::ZwpPointerGesturesV1| {\n                        gesture_manager.get_pinch_gesture(&pointer, qh, ())\n                    },\n                );\n\n                if let Some(wl_pointer) = &state.wl_pointer {\n                    wl_pointer.release();\n                }\n\n                state.wl_pointer = Some(pointer);\n            }\n        }\n    }\n}\n\nimpl Dispatch<wl_keyboard::WlKeyboard, ()> for WaylandClientStatePtr {\n    fn event(\n        this: &mut Self,\n        _: &wl_keyboard::WlKeyboard,\n        event: wl_keyboard::Event,\n        _: &(),","sourceCodeStart":1717,"sourceCodeEnd":1753,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/gpui_linux/src/linux/wayland/client.rs#L1717-L1753","documentation":"When the compositor sends the keymap over a memfd, xkb::Keymap::new_from_fd is expected to succeed; the surrounding code already logs errors for the xkb context path, but a panic here means the fd-based keymap creation failed (bad fd, size mismatch, invalid keymap format) and keyboard input cannot be initialized.","triggerScenarios":"Thrown at crates/gpui_linux/src/linux/wayland/client.rs:1729 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the memfd contents are valid XKB_KEYMAP_FORMAT_TEXT_V1 keymap text","Verify fd and size passed match the compositor-provided mapping","Log the xkb error instead of panicking and fall back to a default keymap","Update xkbcommon and verify compositor keymap support"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}