Repository: neovim
Issue: Treesitter crashes on fresh install of Neovim with no other plugins?
Labels: platform:windows,needs:repro,bug-crash,treesitter

### Problem

NOTE: I am coming from the Treesitter github. They denied that the issue was on their end and suggested I submit the bug on the Neovim github.

I am currently going insane trying to figure out why this is happening. Treesitter seems to indiscriminately crash on any file that has had a parser downloaded for it. Note: I am on Windows 11 and install neovim with winget. I am running neovim in PowerShell 7, but I have the same result in CMD prompt

The last thing I did to test and isolate was the following steps: I uninstalled neovim, deleted the nvim-data folder, removed all plugins except for packer and treesitter. I reinstalled neovim, I loaded my packer config file and ran :PackerSync. All that installed was packer and treesitter.

Unless I'm missing anything that should be a fresh install. I have no other configs loaded except my treesitter config which I will include.

I open Cargo.toml (the file doesn't matter I've tested at least a dozen different files, but the behavior is mostly the same), it opens fine and treesitter auto installs and compiles the tree sitter for *.toml. No crash yet as the parser isn't running.

I close neovim and reopen Cargo.toml. Instant crash, no information is provided.

    :checkhealth Treesitter is good

There are no logs so far as I can find.

My attempts to debug with lldb go like so:

    nvim ./ #in the same directory as Cargo.toml --- no crash

    lldb -p $(nvim pid)

I try to open Cargo.toml from inside of Neovim #Instant freeze or crash

I've gotten two results in lldb

    exception code: 0xc0000409

and

    User-mode data execution prevention (DEP) violation at location 0x00000000 #I've only gotten this once

I just tried again using main.rs and was able to run lldb before the parser compiled. AS the parser was compiling it threw this error:
Exception 0xc0000005 encountered at address 0x7ffd8ed315d1: Access violation reading location 0x00000200

Idk why this is happening as I've never had issues with Treesitter before.

Here's my tree sitter config:

```
require 'nvim-treesitter.configs'.setup {

sync_install = false,
auto_install = true,

ignore_install = { "lua" },

highlight = {

enable = true,

additional_vim_regex_highlighting = false,

},
} 

```

At this point I'm convinced it must be cpu architecture or OS related as I have the exact same setup on my remote linux and don't have this issue.

### Steps to reproduce

With TOML Files
1. I open Cargo.toml. it opens fine and treesitter auto installs and compiles the tree sitter for *.toml. No crash yet as the parser isn't running.
2. I close neovim and reopen Cargo.toml. Instant crash, no information is provided.
3. Trying to reopen Cargo.toml results in an instant crash with no information

With RS Files
1. I open main.rs. It opens fine and Treesitter begins to automatically download the parser. No issues. While attempting to compile Neovim freezes.
2. Trying to open any Rust file if the parser was pre-installed causes the terminal to freeze.

### Expected behavior

Neovim opens and Treesitter initializes without issue

### Nvim version (nvim -v)

0.10.2

### Vim (not Nvim) behaves the same?

n/a

### Operating system/version

Windows 11 23H2

### Terminal name/version

Powershell 7.5.0

### $TERM environment variable

n/a

### Installation

winget