{"record":{"id":"987010f8071f4ace","repo":"slint-ui/slint","slug":"uninitialized-platform","errorCode":null,"errorMessage":"uninitialized platform","messagePattern":"uninitialized platform","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/backends/testing/mcp_server.rs","lineNumber":855,"sourceCode":"\nasync fn run_server(state: Rc<IntrospectionState>, port: u16) {\n    let addr = format!(\"127.0.0.1:{port}\");\n    let listener = match async_net::TcpListener::bind(&addr).await {\n        Ok(l) => l,\n        Err(e) => {\n            eprintln!(\"MCP server: failed to bind to {addr}: {e}\");\n            return;\n        }\n    };\n    eprintln!(\"Slint MCP server listening on http://{addr}/mcp\");\n\n    loop {\n        match listener.accept().await {\n            Ok((stream, _peer)) => {\n                stream.set_nodelay(true).ok();\n                let state = state.clone();\n                let _ = i_slint_core::with_global_context(\n                    || panic!(\"uninitialized platform\"),\n                    |context| {\n                        let _ = context.spawn_local(async move {\n                            handle_connection(&state, stream).await;\n                        });\n                    },\n                );\n            }\n            Err(e) => {\n                eprintln!(\"MCP server: accept error: {e}\");\n            }\n        }\n    }\n}\n\n// ============================================================================\n// Initialization\n// ============================================================================\n","sourceCodeStart":837,"sourceCodeEnd":873,"githubUrl":"https://github.com/slint-ui/slint/blob/3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016/internal/backends/testing/mcp_server.rs#L837-L873","documentation":"Error \"uninitialized platform\" thrown in slint-ui/slint.","triggerScenarios":"Thrown at internal/backends/testing/mcp_server.rs:855 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Initialize the Slint platform/backend before starting the MCP server.","Ensure the MCP server is started after the application creates its window."],"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"}