slint-ui/slint · error
Recursion detected
Error message
Recursion detected
What it means
Error "Recursion detected" thrown in slint-ui/slint.
Source
Thrown at internal/core/properties.rs:628
fn has_no_binding_or_lock(handle: *mut ()) -> bool {
handle.addr() & (BINDING_BORROWED | BINDING_POINTER_TO_BINDING) == 0
}
/// Access the value.
/// Panics if the function try to recursively access the value
fn access<R>(&self, f: impl FnOnce(Option<Pin<&mut BindingHolder>>) -> R) -> R {
#[cfg(slint_debug_property)]
if self.lock_flag() {
unsafe {
let handle = self.handle.get();
if let Some(binding_pointer) = Self::pointer_to_binding(handle) {
let binding = &mut *(binding_pointer);
let debug_name = &binding.debug_name;
panic!("Recursion detected with property {debug_name}");
}
}
}
assert!(!self.lock_flag(), "Recursion detected");
unsafe {
self.set_lock_flag(true);
scopeguard::defer! { self.set_lock_flag(false); }
let handle = self.handle.get();
let binding =
Self::pointer_to_binding(handle).map(|pointer| Pin::new_unchecked(&mut *(pointer)));
f(binding)
}
}
/// Transfer the dependency list from the current binding back to the
/// handle and return the now-detached binding pointer. The binding is
/// **not** dropped; the caller is responsible for its lifetime.
///
/// Returns `None` when the handle does not point to a binding.
fn detach_binding(&self) -> Option<*mut BindingHolder> {
let binding = Self::pointer_to_binding(self.handle.get())?;
unsafe {View on GitHub (pinned to 3fd8f2ec03)
Solutions
- Break the binding loop: remove the cyclic dependency between the reported properties.
- Use a one-way binding or a changed handler to cut the cycle.
When it happens
Trigger: Thrown at internal/core/properties.rs:628 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/55f66d08c260963e.
Report an issue: GitHub.