{"record":{"id":"fbbce765d64fcd09","repo":"slint-ui/slint","slug":"namedreference-to-a-dead-element","errorCode":null,"errorMessage":"{}: NamedReference to a dead element","messagePattern":"(.+?): NamedReference to a dead element","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/compiler/namedreference.rs","lineNumber":56,"sourceCode":"    }\n}\n\nimpl NamedReference {\n    pub fn new(element: &ElementRc, name: SmolStr) -> Self {\n        Self(NamedReferenceInner::from_name(element, name))\n    }\n    pub(crate) fn snapshot(&self, snapshotter: &mut crate::typeloader::Snapshotter) -> Self {\n        NamedReference(Rc::new(self.0.snapshot(snapshotter)))\n    }\n    pub fn name(&self) -> &SmolStr {\n        &self.0.name\n    }\n    #[track_caller]\n    pub fn element(&self) -> ElementRc {\n        self.0\n            .element\n            .upgrade()\n            .unwrap_or_else(|| panic!(\"{}: NamedReference to a dead element\", self.0.name))\n    }\n    pub fn ty(&self) -> Type {\n        self.element().borrow().lookup_property(self.name()).property_type\n    }\n\n    /// return true if the property has a constant value for the lifetime of the program\n    pub fn is_constant(&self) -> bool {\n        self.is_constant_impl(true)\n    }\n\n    /// return true if we know that this property is changed by other means than its own binding\n    pub fn is_externally_modified(&self) -> bool {\n        !self.is_constant_impl(false)\n    }\n\n    /// return true if the property has a constant value for the lifetime of the program\n    fn is_constant_impl(&self, mut check_binding: bool) -> bool {\n        let mut elem = self.element();","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/slint-ui/slint/blob/3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016/internal/compiler/namedreference.rs#L38-L74","documentation":"Error \"{}: NamedReference to a dead element\" thrown in slint-ui/slint.","triggerScenarios":"Thrown at internal/compiler/namedreference.rs:56 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["This is an internal compiler bug; report it with the .slint file that triggers it.","Check for elements removed by earlier passes while still referenced."],"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"}