{"record":{"id":"542c3ca4eec597a0","repo":"slint-ui/slint","slug":"slint-platform-not-initialized","errorCode":null,"errorMessage":"slint platform not initialized","messagePattern":"slint platform not initialized","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"api/rs/slint/lib.rs","lineNumber":781,"sourceCode":"    ///\n    /// fn main() {\n    ///     // ...\n    ///     let downloaded_font: Vec<u8> = todo!(\"Download https://somewebsite.com/font.ttf\");\n    ///     let blob = fontique::Blob::new(std::sync::Arc::new(downloaded_font));\n    ///     let mut collection = slint::fontique_011::shared_collection();\n    ///     let fonts = collection.register_fonts(blob, None);\n    ///     collection\n    ///         .append_fallbacks(fontique::FallbackKey::new(fontique::Script::from_str_unchecked(\"Hira\"), None), fonts.iter().map(|x| x.0));\n    ///     collection\n    ///         .append_fallbacks(fontique::FallbackKey::new(fontique::Script::from_str_unchecked(\"Kana\"), None), fonts.iter().map(|x| x.0));\n    ///     collection\n    ///         .append_fallbacks(fontique::FallbackKey::new(fontique::Script::from_str_unchecked(\"Hani\"), None), fonts.iter().map(|x| x.0));\n    ///     // ...\n    /// }\n    /// ```\n    pub fn shared_collection() -> fontique::Collection {\n        i_slint_core::with_global_context(\n            || panic!(\"slint platform not initialized\"),\n            |ctx| ctx.font_context().borrow().collection.clone(),\n        )\n        .unwrap()\n    }\n}\n","sourceCodeStart":763,"sourceCodeEnd":787,"githubUrl":"https://github.com/slint-ui/slint/blob/3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016/api/rs/slint/lib.rs#L763-L787","documentation":"Error \"slint platform not initialized\" thrown in slint-ui/slint.","triggerScenarios":"Thrown at api/rs/slint/lib.rs:781 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Call slint::platform::set_platform() (or select a backend) before creating components.","Enable a default backend feature so the platform initializes automatically."],"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-14T00:17:10.932Z"}