crash when typing println!(" in Rust: ts_parser__handle_error: Assertion `did_merge' failed #28265
Labels
bug-crash
issue reporting a crash or segfault
has:backtrace
issue contains a stacktrace/ASAN log
treesitter
Problem
When working on a project I found that Neovim would consistently crash in a certain Rust file whenever I typed the characters
println!("
. It would crash exactly when I typed the"
. The error message flashes up only for a frame or so, but I caught it in a recording:Screencast_20240410_211134.webm
I reduced the file to the following minimal example:
Typing
println!("
in the function makes it crash. As far as I can tell, removing any other aspect of the function body suppresses the error. e.g. removing the loop body, removing branches of the if expression, removing either of the printlns.Also, running
TSBufDisable highlight
prevents the crash, so presumably it is treesitter-related.Steps to reproduce
Stacktrace:
bt.txt
My neovim flake, it's not minimal but you should be able to reproduce the problem since everything is pinned:
https://github.com/ckp95/nvflake
Expected behavior
It should not crash when I type
println!("
Neovim version (nvim -v)
v0.9.5
Vim (not Nvim) behaves the same?
idk
Operating system/version
NixOS 24.05
Terminal name/version
konsole 24.02.0
$TERM environment variable
xterm-256color
Installation
custom Nix flake
The text was updated successfully, but these errors were encountered: