{"record":{"id":"e585d0b58a7e97aa","repo":"DioxusLabs/dioxus","slug":"bad-static-root","errorCode":null,"errorMessage":"bad static root","messagePattern":"bad static root","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/diff/node.rs","lineNumber":941,"sourceCode":"                Self::write_attribute_to_current(attr, id, mount, dom, to);\n            }\n        });\n    }\n\n    fn load_template_root(\n        &self,\n        root_anchor_idx: usize,\n        root_op: usize,\n        dom: &mut VirtualDom,\n        to: &mut dyn WriteMutations,\n    ) -> MountedElementId {\n        let target_id = dom.current_render_target_id();\n        let id = dom.next_element_in_target(target_id);\n\n        let static_root = self\n            .template()\n            .static_node(root_op)\n            .expect(\"bad static root\");\n        if to.can_cache_template_roots() {\n            let template_id =\n                match dom.cached_template_root(target_id, *self.template(), root_anchor_idx) {\n                    Some(id) => id,\n                    None => {\n                        let id = dom.allocate_template_root(\n                            target_id,\n                            *self.template(),\n                            root_anchor_idx,\n                        );\n                        create_static_prototype(static_root, to);\n                        to.set_id(id.element_id());\n                        to.pop();\n                        id\n                    }\n                };\n            to.push_id(template_id.element_id());\n            WriteMutations::clone(to);","sourceCodeStart":923,"sourceCodeEnd":959,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/core/src/diff/node.rs#L923-L959","documentation":"`load_template_root` looks up the template's static node for a root op index and `expect`s it to exist. This panic fires when the template's static root list doesn't contain the referenced op — an internal mismatch between compiled templates and the diffing code, not user error.","triggerScenarios":"Thrown at packages/core/src/diff/node.rs:941 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["This is an internal invariant about static root nodes. Report it with a minimal reproduction to the Dioxus issue tracker."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}