nvim-treesitter / nvim-treesitter

Nvim Treesitter configurations and abstraction layer
Apache License 2.0
10.72k stars 896 forks source link

Assertion failed working on .C file #5495

Closed ghost closed 1 year ago

ghost commented 1 year ago

Describe the bug

I get this error on dd(delete line) mostly working on C files but sometimes also on Lua: Assertion failed: (seen), function unintersect_node, file marktree.c, line 359.

TS is up to date and the filetype is correct so I cannot understand what's happening.

To Reproduce

There is no step to reproduce the bug. It happens some times and that's the reason why I don't know how to investigate the solution by my self

Expected behavior

No response

Output of :checkhealth nvim-treesitter

nvim-treesitter: require("nvim-treesitter.health").check()

Installation ~
- OK `tree-sitter` found 0.20.8 (parser generator, only needed for :TSInstallFromGrammar)
- OK `node` found v20.7.0 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
  Version: Apple clang version 14.0.0 (clang-1400.0.29.202)
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

OS Info:
{
  machine = "arm64",
  release = "21.6.0",
  sysname = "Darwin",
  version = "Darwin Kernel Version 21.6.0: Sat Jun 18 17:07:28 PDT 2022; root:xnu-8020.140.41~1/RELEASE_ARM64_T8110"
} ~

Parser/Features         H L F I J
  - bash                ✓ ✓ ✓ . ✓
  - c                   ✓ ✓ ✓ ✓ ✓
  - cpp                 ✓ ✓ ✓ ✓ ✓
  - gitcommit           ✓ . . . ✓
  - go                  ✓ ✓ ✓ ✓ ✓
  - javascript          ✓ ✓ ✓ ✓ ✓
  - lua                 ✓ ✓ ✓ ✓ ✓
  - make                ✓ . ✓ . ✓
  - markdown            ✓ . ✓ ✓ ✓
  - markdown_inline     ✓ . . . ✓
  - meson               ✓ . ✓ . ✓
  - python              ✓ ✓ ✓ ✓ ✓
  - query               ✓ ✓ ✓ ✓ ✓
  - rust                ✓ ✓ ✓ ✓ ✓
  - tsx                 ✓ ✓ ✓ ✓ ✓
  - typescript          ✓ ✓ ✓ ✓ ✓
  - vim                 ✓ ✓ ✓ . ✓
  - vimdoc              ✓ . . . ✓
  - yaml                ✓ ✓ ✓ ✓ ✓

  Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
         +) multiple parsers found, only one will be used
         x) errors found in the query, try to run :TSUpdate {lang} ~

Output of nvim --version

NVIM v0.10.0-dev-1259+gc0f4d6001
Build type: Debug
LuaJIT 2.1.1695653777
Run "nvim -V1 -v" for more info

Additional context

No response

lucario387 commented 1 year ago

Please report this to neovim with the backtrace. This repository is not the right place for it

clason commented 1 year ago

And please test first with the latest commit on Neovim master; there was a related marktree bug that was recently fixed. (Also, you shouldn't be using a Debug build unless you want to hunt down bugs.)

clason commented 1 year ago

Yes, that commit is before the fix. (If you insist on being on a prerelease version, you must keep it constantly updated -- at least daily, and certainly before reporting any issue.)