{"record":{"id":"83de35510fe30d9e","repo":"emilk/egui","slug":"failed-to-spawn-egui-inspection-connection-thread","errorCode":null,"errorMessage":"failed to spawn egui_inspection connection thread","messagePattern":"failed to spawn egui_inspection connection thread","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/egui_inspection/src/plugin.rs","lineNumber":380,"sourceCode":"             and read its screen\"\n        );\n    }\n\n    let ctx = ctx.clone();\n    std::thread::Builder::new()\n        .name(\"egui_inspection_accept\".into())\n        .spawn(move || {\n            for stream in listener.incoming() {\n                let Ok(stream) = stream else { continue };\n                let ctx = ctx.clone();\n                std::thread::Builder::new()\n                    .name(\"egui_inspection_conn\".into())\n                    .spawn(move || {\n                        if let Err(err) = serve_connection(stream, &ctx) {\n                            log::warn!(\"egui_inspection: connection ended: {err}\");\n                        }\n                    })\n                    .expect(\"failed to spawn egui_inspection connection thread\");\n            }\n        })?;\n    Ok(())\n}\n\n/// Connection handler: write the handshake, then read framed requests, submit each to the\n/// plugin via the context, and write the framed response back. Returns once the client\n/// disconnects.\n///\n/// # Errors\n/// On any socket I/O failure.\n#[cfg(not(target_arch = \"wasm32\"))]\nfn serve_connection(stream: std::net::TcpStream, ctx: &Context) -> std::io::Result<()> {\n    use crate::protocol::{read_message, write_handshake, write_message};\n\n    let mut reader = std::io::BufReader::new(stream.try_clone()?);\n    let mut writer = std::io::BufWriter::new(stream);\n","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/emilk/egui/blob/d802a982ce959839d92f4f6718fdffa41143110e/crates/egui_inspection/src/plugin.rs#L362-L398","documentation":"Error \"failed to spawn egui_inspection connection thread\" thrown in emilk/egui.","triggerScenarios":"Thrown at crates/egui_inspection/src/plugin.rs:380 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d802a982ce959839d92f4f6718fdffa41143110e","analyzedAt":"2026-08-16T20:07:53.954Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}