-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Crash when editing a .org file #3376
Comments
Replicated the issue. When attempting to delete the trailing Version: helix 22.05 (404defb)
When attempting to open a file using
|
Syntax highlighting is supported for Org files. https://docs.helix-editor.com/lang-support.html This is an upstream issue with tree-sitter-org: it appears to be entering some sort of loop and consuming all CPU and memory. It looks like this bug is present on the latest commit of tree-sitter-org as well (we're on I suspect the bug lives in the custom scanner implementation. I'll open an issue upstream. |
Hmm interesting I can't reproduce this with tree-sitter-cli's |
Can you use |
Ran a git bisect and found that the issue first appeared in fd644ccfa24b8141c1b8ea32349a0844fe7c884a, which bumped the treesitter version. |
This may be another manifestation of #2997 There must've been some sort of regression with a change in the tree-sitter C API in v0.20.6->v0.20.8 (I have a v0.20.6 CLI) |
Looks like this has been fixed recently upstream in tree-sitter-org: milisims/tree-sitter-org#34 See also the discussion in tree-sitter/tree-sitter#1783 for details about the change in v0.20.8 that lead to this. |
Summary
Helix crashes consistently when an .org file contains a * followed by a blank line.
I understand that Helix does not support .org files, but I would expect them to be treated as text files.
Note that the problem does now occur when the file extension is changed to .txt.
Reproduction Steps
Two ways to reproduce this, first interactively:
Enter insert mode and insert a single *.
Return to normal mode.
Use "o" to open a new line below the current line.
The editor freezes and, after a short wait, crashes.
Alternatively:
The above results is a crash.
Helix log
2022-08-09T17:03:52.486 helix_view::theme [WARN] Theme: malformed hexcode: grey09
2022-08-09T17:03:52.488 helix_view::theme [WARN] Theme: malformed hexcode: grey08
2022-08-09T17:03:52.488 helix_view::theme [WARN] Theme: malformed hexcode: grey0D
Platform
Linux (Arch)
Terminal Emulator
Alacritty
Helix Version
helix 22.05 (404defb)
The text was updated successfully, but these errors were encountered: