{"record":{"id":"2b1bee1abed8d0b1","repo":"zed-industries/zed","slug":"this-index-will-always-exist","errorCode":null,"errorMessage":"This index will always exist","messagePattern":"This index will always exist","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/debugger_ui/src/session/running/stack_frame_list.rs","lineNumber":887,"sourceCode":"                StackFrameFilter::OnlyUserFrames => {\n                    self.list_state.reset(self.filter_entries_indices.len());\n                    if !self\n                        .selected_ix\n                        .map(|ix| self.filter_entries_indices.contains(&ix))\n                        .unwrap_or_default()\n                    {\n                        self.selected_ix = None;\n                    }\n                }\n            }\n\n            if let Some(ix) = self.selected_ix {\n                let scroll_to = match self.list_filter {\n                    StackFrameFilter::All => ix,\n                    StackFrameFilter::OnlyUserFrames => self\n                        .filter_entries_indices\n                        .binary_search_by_key(&ix, |ix| *ix)\n                        .expect(\"This index will always exist\"),\n                };\n                self.list_state.scroll_to_reveal_item(scroll_to);\n            }\n\n            cx.emit(StackFrameListEvent::BuiltEntries);\n            cx.notify();\n        }\n    }\n\n    fn render_list(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {\n        div().p_1().size_full().child(\n            list(\n                self.list_state.clone(),\n                cx.processor(|this, ix, _window, cx| this.render_entry(ix, cx)),\n            )\n            .size_full(),\n        )\n    }","sourceCodeStart":869,"sourceCodeEnd":905,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/debugger_ui/src/session/running/stack_frame_list.rs#L869-L905","documentation":"Internal assertion in stack_frame_list.rs while scrolling to the selected stack frame after toggling a frame filter: the selected index is expected to always exist in the filtered list at that point. Firing indicates a filter/index desynchronization bug in the list state.","triggerScenarios":"Thrown at crates/debugger_ui/src/session/running/stack_frame_list.rs:887 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reset the selected frame index after toggling the filter (the code already attempts this)","File a bug with the debugger session and filter state that triggered it","Toggle the filter again or restart the debug session to resync indices"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}