{"record":{"id":"22070541ba477d90","repo":"slint-ui/slint","slug":"internal-compiler-error-more-than-one-strong-refe","errorCode":null,"errorMessage":"internal compiler error: more than one strong reference left to repeated component when lowering shadow properties","messagePattern":"internal compiler error: more than one strong reference left to repeated component when lowering shadow properties","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/compiler/object_tree.rs","lineNumber":4578,"sourceCode":"        .unwrap();\n        let expr_v =\n            BindingExpression::new_with_span(expr_v, old_root.borrow().to_source_location());\n        li_v.element().borrow_mut().set_binding(li_v.name().clone(), expr_v);\n        let expr_h =\n            BindingExpression::new_with_span(expr_h, old_root.borrow().to_source_location());\n        li_h.element().borrow_mut().set_binding(li_h.name().clone(), expr_h);\n        Some((li_h.clone(), li_v.clone()))\n    });\n    new_root.borrow_mut().layout_info_prop = layout_info_prop;\n    forward_layout_info_with_constraint(&new_root, old_root);\n\n    // Replace the repeated component's element with our shadow element. That requires a bit of reference counting\n    // surgery and relies on nobody having a strong reference left to the component, which we take out of the Rc.\n    drop(std::mem::take(&mut repeated_element.borrow_mut().base_type));\n\n    debug_assert_eq!(Rc::strong_count(&component), 1);\n\n    let mut component = Rc::try_unwrap(component).expect(\"internal compiler error: more than one strong reference left to repeated component when lowering shadow properties\");\n\n    let old_root = std::mem::replace(&mut component.root_element, new_root.clone());\n    new_root.borrow_mut().children.push(old_root);\n\n    let component = Rc::new(component);\n    repeated_element.borrow_mut().base_type = ElementType::Component(component.clone());\n\n    for elem in elements_with_enclosing_component_reference {\n        elem.borrow_mut().enclosing_component = Rc::downgrade(&component);\n    }\n}\n\n/// Make the geometry of the `injected_parent` that of the old_elem. And the old_elem\n/// will cover the `injected_parent`\npub fn adjust_geometry_for_injected_parent(injected_parent: &ElementRc, old_elem: &ElementRc) {\n    let mut injected_parent_mut = injected_parent.borrow_mut();\n    injected_parent_mut.set_binding(\n        \"z\".into(),","sourceCodeStart":4560,"sourceCodeEnd":4596,"githubUrl":"https://github.com/slint-ui/slint/blob/3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016/internal/compiler/object_tree.rs#L4560-L4596","documentation":"Error \"internal compiler error: more than one strong reference left to repeated component when lowering shadow properties\" thrown in slint-ui/slint.","triggerScenarios":"Thrown at internal/compiler/object_tree.rs:4578 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Internal compiler bug: report the .slint file that triggers it.","Try simplifying repeated components with shadow properties."],"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"}