{"record":{"id":"70ab1b3c38df7f06","repo":"zed-industries/zed","slug":"app-is-already-running","errorCode":null,"errorMessage":"App is already running","messagePattern":"App is already running","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/gpui_linux/src/linux/headless/client.rs","lineNumber":139,"sourceCode":"    fn write_to_primary(&self, _item: gpui::ClipboardItem) {}\n\n    fn write_to_clipboard(&self, _item: gpui::ClipboardItem) {}\n\n    fn read_from_primary(&self) -> Option<gpui::ClipboardItem> {\n        None\n    }\n\n    fn read_from_clipboard(&self) -> Option<gpui::ClipboardItem> {\n        None\n    }\n\n    fn run(&self) {\n        let mut event_loop = self\n            .0\n            .borrow_mut()\n            .event_loop\n            .take()\n            .expect(\"App is already running\");\n\n        event_loop.run(None, &mut self.clone(), |_| {}).log_err();\n    }\n}\n","sourceCodeStart":121,"sourceCodeEnd":144,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/gpui_linux/src/linux/headless/client.rs#L121-L144","documentation":"HeadlessPlatform::run takes the stored Option<EventLoop>; it is None when run() was already called before, so the expect panics with 'App is already running'. GPUI supports exactly one run loop per platform; a second run() call is a caller error.","triggerScenarios":"Thrown at crates/gpui_linux/src/linux/headless/client.rs:139 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the application calls Platform::run only once","Don't restart the event loop by re-invoking run from within callbacks","For restarts, create a fresh platform/app instance instead"],"exampleFix":null,"handlingStrategy":"validation","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"}