{"record":{"id":"db91fc37325382d0","repo":"DioxusLabs/dioxus","slug":"template-path-stack-capacity-exceeded","errorCode":null,"errorMessage":"template path stack capacity exceeded","messagePattern":"template path stack capacity exceeded","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core-template/src/storage.rs","lineNumber":170,"sourceCode":"impl TemplateLoweringCursor {\n    pub const fn new() -> Self {\n        let mut next_paths = [TemplatePath::empty(); TEMPLATE_PATH_STACK_CAP];\n        next_paths[0] = TemplatePath::root(0);\n        Self {\n            enter_stack: [TemplateElementFrame {\n                enter_index: 0,\n                namespace: false,\n                path: TemplatePath::empty(),\n            }; TEMPLATE_PATH_STACK_CAP],\n            next_paths,\n            last_static_paths: [TemplatePath::empty(); TEMPLATE_PATH_STACK_CAP],\n            stack_pointer: 0,\n        }\n    }\n\n    pub const fn open_element(&mut self, enter_index: usize, namespace: bool) {\n        if self.stack_pointer + 1 >= TEMPLATE_PATH_STACK_CAP {\n            panic!(\"template path stack capacity exceeded\");\n        }\n        let path = self.next_paths[self.stack_pointer];\n        self.next_paths[self.stack_pointer] = path.next_sibling();\n        self.enter_stack[self.stack_pointer] = TemplateElementFrame {\n            enter_index,\n            namespace,\n            path,\n        };\n        self.next_paths[self.stack_pointer + 1] = path.next_child();\n        self.last_static_paths[self.stack_pointer + 1] = TemplatePath::empty();\n        self.last_static_paths[self.stack_pointer] = path;\n        self.stack_pointer += 1;\n    }\n\n    pub const fn close_element(&mut self) -> TemplateElementFrame {\n        if self.stack_pointer == 0 {\n            panic!(\"template close op without matching open op\");\n        }","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/core-template/src/storage.rs#L152-L188","documentation":"TemplateLoweringCursor uses fixed-size stacks (TEMPLATE_PATH_STACK_CAP) for element frames and paths. Opening more nested elements than the stack capacity while lowering a template exhausts it, and this guard aborts with the capacity-exceeded message.","triggerScenarios":"Thrown at packages/core-template/src/storage.rs:170 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The template path stack overflowed its capacity. Reduce template nesting depth by splitting the component."],"exampleFix":null,"handlingStrategy":"validation","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"}