-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when loading one particular Markdown file #253
Comments
Another offending file |
For the sample in this comment, here
For the sample in this comment, here
Output looks the same to me, though the input files appear to differ. This is using ikatyang's markdown grammar at commit 8b8b77af and the tree-sitter cli commit is 524bf7e2. |
It appears to be caused by table-long dash-lines in tables -- this example crashes emacs with the following backtrace (using the version available at commit As the assertion seems to come from https://github.com/ikatyang/tree-sitter-markdown/, it probably requires a fix there. It does not seem to be related to ikatyang/tree-sitter-markdown#59 or ikatyang/tree-sitter-markdown#57, I'll open a new issue there.
|
The following extract from the first sample was enough to cause the error for me: | Key | Type | Required? | Description | | --------- | ---------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `exclude` | array of strings | no | Each array member is a pattern that will be matched against potential files when `precious` is run. These patterns are matched in the same way as patterns in a [gitignore file](https://git-scm.com/docs/gitignore#_pattern_format). |
Thanks for digging into this and reporting it to the right place. Does it make sense to leave this issue open until upstream fixes it? I'm assuming that |
Leaving the issue open seems good to me. |
I see this on Emacs 30.0.5 using tree-sitter with https://github.com/ikatyang/tree-sitter-markdown and my crash is also on tables. I'm using the built-in tree-sitter in Emacs 30, not this library directly, but this issue is the best place with examples + root cause, so tossing my example README file in here: |
…tree-sitter Due to ikatyang/tree-sitter-markdown#60, the markdown grammar provided in tree-sitter-langs crashes emacs on certain files (emacs-tree-sitter/elisp-tree-sitter#253). As there has been no activity in the upstream grammar repository and I'd rather use spacemacs' tree-sitter where available, I'm using a deny-list to completly avoid loading the binary of offending grammars.
I've seen this crash in both Emacs 27 & 28, with the packages tree-sitter@3cfab8a0e945db9b3df84437f27945746a43cc71 and tree-sitter-langs@d8f8ac4faeb4564fbb61e94a631b4672523d84a9
If I run
emacs --debug
from the CLI I see this when it crashes:The file in question is attached to this issue.
README.md
The text was updated successfully, but these errors were encountered: