Nvim-treesitter: Assertion 'ts_subtree_is_eof(lookahead)' failed

Created on 11 Sep 2020  路  6Comments  路  Source: nvim-treesitter/nvim-treesitter

Describe the bug
When editing a file newly created with "touch" command, entering insert mode and start typing showing error :
nvim: /home/user/.cache/yay/neovim-git/src/neovim-git/src/tree_sitter/parser.c:878: ts_parser__accept: Assertion 'ts_subtree_is_eof(lookahead)' failed. fish: "nvim test.cpp" terminated by signal SIGABRT (Abort)

To Reproduce
Steps to reproduce the behavior:

  1. Create a new file, for example "touch test.cpp"
  2. Open file using "nvim test.cpp"
  3. Enter insert mode and start typing
  4. Error shown, nvim terminated

Expected behavior
The app run normally

Output of :checkhealth nvim_treesitter


health#nvim_treesitter#check

Installation

  • OK: git executable found.
  • OK: cc executable found.

elm parser healthcheck

c parser healthcheck

  • OK: c parser found.
  • OK: highlights.scm found.
  • OK: locals.scm found.
  • OK: textobjects.scm found.
  • OK: fold.scm found.

java parser healthcheck

python parser healthcheck

  • OK: python parser found.
  • OK: highlights.scm found.
  • OK: locals.scm found.
  • OK: textobjects.scm found.
  • OK: fold.scm found.

dart parser healthcheck

lua parser healthcheck

  • OK: lua parser found.
  • OK: highlights.scm found.
  • OK: locals.scm found.
  • OK: textobjects.scm found.
  • OK: fold.scm found.

ocaml parser healthcheck

go parser healthcheck

nix parser healthcheck

yaml parser healthcheck

json parser healthcheck

jsdoc parser healthcheck

markdown parser healthcheck

julia parser healthcheck

html parser healthcheck

typescript parser healthcheck

  • OK: typescript parser found.
  • OK: highlights.scm found.
  • OK: locals.scm found.
  • OK: textobjects.scm found.
  • OK: fold.scm found.

fennel parser healthcheck

swift parser healthcheck

query parser healthcheck

cpp parser healthcheck

  • OK: cpp parser found.
  • OK: highlights.scm found.
  • OK: locals.scm found.
  • OK: textobjects.scm found.
  • OK: fold.scm found.

ruby parser healthcheck

vue parser healthcheck

scala parser healthcheck

tsx parser healthcheck

  • OK: tsx parser found.
  • OK: highlights.scm found.
  • OK: locals.scm found.
  • OK: textobjects.scm found.
  • OK: fold.scm found.

rust parser healthcheck

bash parser healthcheck

c_sharp parser healthcheck

rst parser healthcheck

css parser healthcheck

php parser healthcheck

javascript parser healthcheck

  • OK: javascript parser found.
  • OK: highlights.scm found.
  • OK: locals.scm found.
  • OK: textobjects.scm found.
  • OK: fold.scm found.

haskell parser healthcheck

toml parser healthcheck

regex parser healthcheck


Output of nvim --version

NVIM v0.5.0-681-g7ba28b1ae
Build type: RelWithDebInfo
LuaJIT 2.0.5
Compilation: /usr/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/hanifrmdhn/.cache/yay/neovim-git/src/build/config -I/home/hanifrmdhn/.cache/yay/neovim-git/src/neovim-git/src -I/usr/include -I/home/hanifrmdhn/.cache/yay/neovim-git/src/build/src/nvim/auto -I/home/hanifrmdhn/.cache/yay/neovim-git/src/build/include
Compiled by hanifrmdhn@omnib0x

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Additional context
Add any other context about the problem here.

bug

Most helpful comment

I have a repro and I have been working on that upstream. The issue is still a bit tricky to understand to be honest, but this is being worked on!

All 6 comments

I was seeing this yesterday, I can't reproduce this today with the latest version of neovim

I have a repro and I have been working on that upstream. The issue is still a bit tricky to understand to be honest, but this is being worked on!

@vigoux can you please provide a link to upstream issue if there is one?

I don't think there is an issue opened upstream (yet) feel free to open one!

Lokks like it's been fixed in the upstream. I'll test it tonight.

Yeah, the fix landed yesterday, it should be all good now!

Was this page helpful?
0 / 5 - 0 ratings