slint-ui/slint · error
{}: NamedReference to a dead element
Error message
{}: NamedReference to a dead element What it means
Error "{}: NamedReference to a dead element" thrown in slint-ui/slint.
Source
Thrown at internal/compiler/namedreference.rs:56
}
}
impl NamedReference {
pub fn new(element: &ElementRc, name: SmolStr) -> Self {
Self(NamedReferenceInner::from_name(element, name))
}
pub(crate) fn snapshot(&self, snapshotter: &mut crate::typeloader::Snapshotter) -> Self {
NamedReference(Rc::new(self.0.snapshot(snapshotter)))
}
pub fn name(&self) -> &SmolStr {
&self.0.name
}
#[track_caller]
pub fn element(&self) -> ElementRc {
self.0
.element
.upgrade()
.unwrap_or_else(|| panic!("{}: NamedReference to a dead element", self.0.name))
}
pub fn ty(&self) -> Type {
self.element().borrow().lookup_property(self.name()).property_type
}
/// return true if the property has a constant value for the lifetime of the program
pub fn is_constant(&self) -> bool {
self.is_constant_impl(true)
}
/// return true if we know that this property is changed by other means than its own binding
pub fn is_externally_modified(&self) -> bool {
!self.is_constant_impl(false)
}
/// return true if the property has a constant value for the lifetime of the program
fn is_constant_impl(&self, mut check_binding: bool) -> bool {
let mut elem = self.element();View on GitHub (pinned to 3fd8f2ec03)
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.
When it happens
Trigger: Thrown at internal/compiler/namedreference.rs:56 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of slint-ui/slint@3fd8f2ec03 (2026-08-19).
Data as JSON: /api/errors/fbbce765d64fcd09.
Report an issue: GitHub.