Skip to content

Segmentation fault while trying to render an html file with base64 encoded image data #7330

Closed as not planned
@Zai-Kun

Description

Describe the bug

Neovim crashes (because of treesitter) when trying to open an HTML file that has a base64 encoded image. I'm sure it is treesitter that is causing this because when I disable the plugin, it doesn't crash. Please see the attached video:

recorded_video.mp4

To Reproduce

Open up the provided HTML file (or any HTML file with base64 encoded) with neovim with treesitter installed. (renamed it to index.txt as github doesn't allow HTML files)

index.txt

Expected behavior

self explanatory

Output of :checkhealth nvim-treesitter

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

Installation ~

  • WARNING tree-sitter executable not found (parser generator, only needed for :TSInstallFromGrammar, not required for :TSInstall)
  • OK node found v22.7.0 (only needed for :TSInstallFromGrammar)
  • OK git executable found.
  • OK cc executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
    Version: cc (GCC) 14.2.1 20240910
  • OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

OS Info:
{
machine = "x86_64",
release = "6.10.7-zen1-1-zen",
sysname = "Linux",
version = "#1 ZEN SMP PREEMPT_DYNAMIC Thu, 29 Aug 2024 16:48:33 +0000"
} ~

Parser/Features H L F I J

  • bash ✓ ✓ ✓ . ✓
  • c ✓ ✓ ✓ ✓ ✓
  • cpp ✓ ✓ ✓ ✓ ✓
  • css ✓ . ✓ ✓ ✓
  • diff ✓ . ✓ . ✓
  • gitignore ✓ . . . ✓
  • html ✓ ✓ ✓ ✓ ✓
  • htmldjango ✓ . ✓ ✓ ✓
  • ini ✓ . ✓ . ✓
  • javascript ✓ ✓ ✓ ✓ ✓
  • json ✓ ✓ ✓ ✓ .
  • jsonc ✓ ✓ ✓ ✓ ✓
  • lua ✓ ✓ ✓ ✓ ✓
  • make ✓ . ✓ . ✓
  • markdown ✓ . ✓ ✓ ✓
  • markdown_inline ✓ . . . ✓
  • nginx ✓ . ✓ . ✓
  • php ✓ ✓ ✓ ✓ ✓
  • python ✓ ✓ ✓ ✓ ✓
  • query ✓ ✓ ✓ ✓ ✓
  • requirements ✓ . . . ✓
  • rust ✓ ✓ ✓ ✓ ✓
  • scheme ✓ . ✓ . ✓
  • toml ✓ ✓ ✓ ✓ ✓
  • vim ✓ ✓ ✓ . ✓
  • vimdoc ✓ . . . ✓

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.1
Build type: Release
LuaJIT 2.1.1723675123
Run "nvim -V1 -v" for more info

Additional context

No response

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions