#16271·helix

helix panics and crashes when editing/deleting auto-completed snippet placeholders (specifically closing/opening parentheses) while an active snippet session is tracked

Author: Husain206Created Sep 13, 2026Updated Sep 13, 2026
LabelsC-bug

Summary

note: so far it has only occurred with unary functions

Reproduction Steps

  1. trigger an LSP completion that inserts a snippet with function arguments (e.g., putchar(int c) or atexit(...)).
  2. type or auto-complete inside the function arguments.
  3. use backspace/delete to delete parameter text + matched parenthesis manually while the snippet placeholder region is still active.

Panic Message

thread 'main' (486743) panicked at helix-core/src/snippets/active.rs:167:13:
internal error: entered unreachable code: active snippet must be valid Selection { ranges: [Range { anchor: 195, head: 196, old_visual_position: None }], primary_index: 0 } [Range { start: 172, end: 195 }]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Helix Log

~/.cache/helix/helix.log
[ERROR] clangd err <- "I[06:11:00.036] Failed to find compilation database for /home3/pjs/cpp/games/helix_motion_floor_cursor/include/enable_raw_mode.hpp\n"
[ERROR] clangd err <- "I[06:11:00.036] ASTWorker building file /home3/pjs/cpp/games/helix_motion_floor_cursor/include/enable_raw_mode.hpp version 47 with command clangd fallback\n"
[ERROR] clangd err <- "[/home3/pjs/cpp/games/helix_motion_floor_cursor/include]\n"
[ERROR] clangd err <- "/usr/bin/clang -resource-dir=/usr/lib/clang/22 -- /home3/pjs/cpp/games/helix_motion_floor_cursor/include/enable_raw_mode.hpp\n"
[ERROR] clangd err <- "I[06:11:00.040] --> textDocument/publishDiagnostics\n"
[ERROR] clangd err <- "I[06:11:00.106] <-- textDocument/signatureHelp(23)\n"
[ERROR] clangd err <- "I[06:11:00.112] --> reply:textDocument/signatureHelp(23) 6 ms\n"
[ERROR] clangd err <- "I[06:11:00.173] <-- textDocument/didChange\n"
[ERROR] clangd err <- "I[06:11:00.224] Failed to find compilation database for /home3/pjs/cpp/games/helix_motion_floor_cursor/include/enable_raw_mode.hpp\n"
[ERROR] clangd err <- "I[06:11:00.224] ASTWorker building file /home3/pjs/cpp/games/helix_motion_floor_cursor/include/enable_raw_mode.hpp version 48 with command clangd fallback\n"
[ERROR] clangd err <- "[/home3/pjs/cpp/games/helix_motion_floor_cursor/include]\n"
[ERROR] clangd err <- "/usr/bin/clang -resource-dir=/usr/lib/clang/22 -- /home3/pjs/cpp/games/helix_motion_floor_cursor/include/enable_raw_mode.hpp\n"
[ERROR] clangd err <- "I[06:11:00.232] --> textDocument/publishDiagnostics\n"
[ERROR] clangd err <- "I[06:11:18.517] clangd version 22.1.8\n"
[ERROR] clangd err <- "I[06:11:18.517] Features: linux\n"
[ERROR] clangd err <- "I[06:11:18.517] PID: 484741\n"
[ERROR] clangd err <- "I[06:11:18.517] Working directory: /home3/pjs/cpp/games/helix_motion_floor_cursor/include\n"
[ERROR] clangd err <- "I[06:11:18.517] argv[0]: /usr/bin/clangd\n"
[ERROR] clangd err <- "I[06:11:18.517] Starting LSP over stdin/stdout\n"
[ERROR] clangd err <- "I[06:11:18.518] <-- initialize(0)\n"
[ERROR] clangd err <- "I[06:11:18.518] --> reply:initialize(0) 0 ms\n"
[ERROR] clangd err <- "I[06:11:18.518] <-- initialized\n"
[ERROR] clangd err <- "I[06:11:18.518] <-- textDocument/didOpen\n"
[ERROR] clangd err <- "I[06:11:18.519] Failed to find compilation database for /home3/pjs/cpp/games/helix_motion_floor_cursor/include/enable_raw_mode.hpp\n"
[ERROR] clangd err <- "I[06:11:18.519] ASTWorker building file /home3/pjs/cpp/games/helix_motion_floor_cursor/include/enable_raw_mode.hpp version 0 with command clangd fallback\n"
[ERROR] clangd err <- "[/home3/pjs/cpp/games/helix_motion_floor_cursor/include]\n"
[ERROR] clangd err <- "/usr/bin/clang -resource-dir=/usr/lib/clang/22 -- /home3/pjs/cpp/games/helix_motion_floor_cursor/include/enable_raw_mode.hpp\n"
[ERROR] clangd err <- "I[06:11:18.531] Built preamble of size 441200 for file /home3/pjs/cpp/games/helix_motion_floor_cursor/include/enable_raw_mode.hpp version 0 in 0.01 seconds\n"
[ERROR] clangd err <- "I[06:11:18.532] Indexing c++17 standard library in the context of /home3/pjs/cpp/games/helix_motion_floor_cursor/include/enable_raw_mode.hpp\n"
[ERROR] clangd err <- "I[06:11:18.538] --> textDocument/publishDiagnostics\n"
[ERROR] clangd err <- "I[06:11:19.307] Indexed c++17 standard library (incomplete due to errors): 14085 symbols, 11735 filtered\n"

Platform

arch linux

Terminal Emulator

kitty 0.48.2

Installation Method

pacman

Helix Version

helix 25.07.1