{"record":{"id":"747857d9297668dd","repo":"DioxusLabs/dioxus","slug":"zero-node-root-anchor-must-own-a-static-node","errorCode":null,"errorMessage":"zero-node root anchor must own a static node","messagePattern":"zero-node root anchor must own a static node","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/diff/template.rs","lineNumber":239,"sourceCode":"            let anchor = DynamicAnchor::new(self.vnode, anchor_index);\n            if !anchor.is_root_level() {\n                continue;\n            }\n\n            let static_root = (!anchor.is_last_static_node() && anchor.static_path().is_root())\n                .then(|| {\n                    self.vnode\n                        .template()\n                        .static_node_at_path(anchor.static_path())\n                        .expect(\"static root anchor\")\n                });\n\n            if anchor.nodes().len() > 0 {\n                self.pending_static = static_root.map(|node| (anchor_index, node));\n                return Some(VNodeChild::Dynamic(anchor));\n            }\n\n            let node = static_root.expect(\"zero-node root anchor must own a static node\");\n            let path = self.vnode.template().anchors()[anchor_index].static_path();\n            return Some(static_child(self.vnode, node, path, Some(anchor_index)));\n        }\n\n        None\n    }\n}\n\n#[derive(Clone, Copy)]\nstruct ElementChildCursor<'a> {\n    static_children: StaticChildCursor<'a>,\n    dynamic_children: DynamicChildCursor<'a>,\n    next_static: Option<PositionedChild<'a>>,\n    next_dynamic: Option<PositionedChild<'a>>,\n}\n\nimpl<'a> ElementChildCursor<'a> {\n    fn new(element: StaticElement<'a>) -> Self {","sourceCodeStart":221,"sourceCodeEnd":257,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/core/src/diff/template.rs#L221-L257","documentation":"The iterator asserts that a root-level dynamic anchor with zero nodes still owns a static node at its path; the `expect` fires when the template lookup returns None. This is an internal template invariant violation from template generation, not user error.","triggerScenarios":"Thrown at packages/core/src/diff/template.rs:239 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["This is an internal invariant about zero-node root anchors. 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-14T05:17:10.506Z"}