{"record":{"id":"10be762a7c189643","repo":"zed-industries/zed","slug":"erasededitorfactory-to-be-initialized","errorCode":null,"errorMessage":"ErasedEditorFactory to be initialized","messagePattern":"ErasedEditorFactory to be initialized","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/remote_connection/src/remote_connection.rs","lineNumber":64,"sourceCode":"\npub struct RemoteConnectionModal {\n    pub prompt: Entity<RemoteConnectionPrompt>,\n    paths: Vec<PathBuf>,\n    finished: bool,\n}\n\nimpl RemoteConnectionPrompt {\n    pub fn new(\n        connection_string: String,\n        nickname: Option<String>,\n        is_wsl: bool,\n        is_devcontainer: bool,\n        window: &mut Window,\n        cx: &mut Context<Self>,\n    ) -> Self {\n        let editor_factory = ERASED_EDITOR_FACTORY\n            .get()\n            .expect(\"ErasedEditorFactory to be initialized\");\n        let editor = (editor_factory)(window, cx);\n\n        Self {\n            connection_string: connection_string.into(),\n            nickname: nickname.map(|nickname| nickname.into()),\n            is_wsl,\n            is_devcontainer,\n            editor,\n            status_message: None,\n            cancellation: None,\n            prompt: None,\n            prompt_cancellation_task: None,\n            is_password_prompt: false,\n            is_masked: true,\n        }\n    }\n\n    pub fn set_cancellation_tx(&mut self, tx: oneshot::Sender<()>) {","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/remote_connection/src/remote_connection.rs#L46-L82","documentation":"RemoteConnectionPrompt::new expects ERASED_EDITOR_FACTORY (a global set by the UI layer at startup) to be initialized. It is None, meaning the modal was constructed before the editor factory global was registered — an initialization-order bug.","triggerScenarios":"Thrown at crates/remote_connection/src/remote_connection.rs:64 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure editor UI init runs before any remote connection modal can open","Guard construction and defer until the factory is available","Panic message should note the missing init call for diagnosis"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}