-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Segfault in neovim when injected in markdown #124
Comments
the Elm parser segfaults when injected in markdown. Disable it for now. See elm-tooling/tree-sitter-elm#124
the Elm parser segfaults when injected in markdown. Disable it for now. See elm-tooling/tree-sitter-elm#124
This unsurprisingly is also reproducible in other editors. I just hit it in helix. Someone else also hit it an filed a while back: helix-editor/helix#3745 |
Update: this bug doesn't seem to happen anymore. However, it seems writing any elm code in a fenced markdown code block leads to the editor crashing. |
I just encountered a similar problem in helix with a normal Elm module (with an invalid use of an undefined type instance as the input to a case expression): helix-editor/helix#6981 |
reproduced this in helix with dillonkearns/elm-markdown. cd to repo, space-f, segfault. helix 23.03, elm-language-server 2.7.0. |
I'm not able to reproduce it, entering the mentioned code in |
maybe the problem isn't in the parsing but something that happens after that? just guessing |
If it helps, here's a fresh stack trace taken today: (gdb) bt
#0 0x0000555555951d24 in ts_decode_utf8 ()
#1 0x0000555555951f27 in ts_lexer.get_lookahead ()
#2 0x00005555559522b2 in ts_lexer.get_column ()
#3 0x00007ffff57302bb in tree_sitter_elm_external_scanner_scan () from /home/cyber/.local/share/nvim/lazy/nvim-treesitter/parser/elm.so
#4 0x000055555593f03a in ts_parser_parse ()
#5 0x000055555574f67e in parser_parse.lto_priv ()
#6 0x00005555559773f6 in lj_BC_FUNCC ()
#7 0x00005555559637f6 in lua_pcall (L=0x7ffff7e65380, nargs=<optimized out>, nresults=1, errfunc=<optimized out>) at lj_api.c:1116
#8 0x000055555573ed08 in nlua_pcall ()
#9 0x0000555555744640 in nlua_call_ref ()
#10 0x0000555555631937 in getnextac ()
#11 0x00005555556daecc in do_cmdline ()
#12 0x0000555555630b38 in apply_autocmds_group ()
#13 0x00005555557c8cc0 in did_set_string_option ()
#14 0x00005555557cb61f in set_string_option ()
#15 0x00005555556e3e73 in ex_setfiletype.lto_priv ()
#16 0x00005555556d7d8d in execute_cmd0 ()
#17 0x00005555556d83e4 in execute_cmd ()
#18 0x0000555555604e0b in nvim_cmd ()
#19 0x00005555555e8fba in nlua_api_nvim_cmd.lto_priv ()
#20 0x00005555559773f6 in lj_BC_FUNCC ()
#21 0x00005555559637f6 in lua_pcall (L=0x7ffff7e65380, nargs=<optimized out>, nresults=1, errfunc=<optimized out>) at lj_api.c:1116
#22 0x000055555573ed08 in nlua_pcall ()
#23 0x0000555555744640 in nlua_call_ref ()
#24 0x00005555555ffe7f in nvim_buf_call ()
#25 0x00005555555e886b in nlua_api_nvim_buf_call.lto_priv ()
#26 0x00005555559773f6 in lj_BC_FUNCC ()
#27 0x00005555559637f6 in lua_pcall (L=0x7ffff7e65380, nargs=<optimized out>, nresults=1, errfunc=<optimized out>) at lj_api.c:1116
#28 0x000055555573ed08 in nlua_pcall ()
#29 0x0000555555744640 in nlua_call_ref ()
#30 0x0000555555631937 in getnextac ()
#31 0x00005555556daecc in do_cmdline ()
#32 0x0000555555630b38 in apply_autocmds_group ()
#33 0x00005555556faad6 in readfile ()
#34 0x00005555556383fb in open_buffer ()
#35 0x00005555555e26fd in main () |
had the same issue in helix with dillonkearns/elm-markdown |
Just discovered the same issue in neovim with codeblocks and elm in markdown, I was going to post an issue but instead I guess I'll just follow this thread. In the mean time I'm currently trying to figure out if I can disable specific parsers on a per file type basis, will report back if if this works as a temporary fix. |
For anyone else who is having the same issue, I updated nvim to |
I don't see this issue too anymore, should we close it ? |
I'm still seeing this crash in elm-language-server 2.8.0, with the helix editor. |
looks like helix is behind this repo https://github.com/helix-editor/helix/blob/master/languages.toml#L1674 might be an easy PR to make if that fixes it? |
I put this
Into my No idea if I'm doing it right, but gave it a shot. |
Hi,
when injecting an elm tag inside markdown in neovim, neovim will segfault.
To reproduce:
nvim test.md
(with nvim-treesitter and elm/markdown parsers installed)I first thought it was related to the markdown parser, but since other languages do not segfault, i believe this is related to this parser.
The text was updated successfully, but these errors were encountered: