Himujjal / tree-sitter-svelte

Tree sitter grammar for Svelte
MIT License
81 stars 14 forks source link

Core dump in neovim #57

Closed OrakMoya closed 5 months ago

OrakMoya commented 5 months ago

nvim dumps core when using this parser. Journalctl reports:

systemd-coredump[15240]: [🡕] Process 13177 (nvim) of user 1000 dumped core.

                                                  Stack trace of thread 13177:
                                                  #0  0x00007b6f4f7c7e3e __libc_free (libc.so.6 + 0x9be3e)
                                                  #1  0x00007b6f4e409725 n/a (/home/orakmoya/.local/share/nvim/lazy/nvim-treesitter/parser/svelte.so + 0x4725)
                                                  ELF object binary architecture: AMD x86-64

Edit: here's the stack trace

#0  0x00007ffff7bbde3e in __GI___libc_free (mem=0x16) at malloc.c:3375
#1  0x00007ffff5e05725 in tree_sitter_svelte_external_scanner_destroy () from /home/orakmoya/.local/share/nvim/lazy/nvim-treesitter/parser/svelte.so
#2  0x00007ffff7ef8a4e in ts_parser__external_scanner_destroy (self=0x555555c455e0) at lib/src/parser.c:383
#3  ts_parser_reset (self=self@entry=0x555555c455e0) at lib/src/parser.c:1968
#4  0x00007ffff7ef9120 in ts_parser_parse (self=0x555555c455e0, old_tree=old_tree@entry=0x555555c1e810, input=...) at lib/src/parser.c:2112
#5  0x000055555571aa1d in parser_parse (L=0x7ffff7f90380) at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/lua/treesitter.c:441
#6  0x00007ffff7e52ef6 in ?? () from /usr/lib/libluajit-5.1.so.2
#7  0x00007ffff7e65ab3 in lua_pcall () from /usr/lib/libluajit-5.1.so.2
#8  0x000055555570a2fd in nlua_pcall (lstate=lstate@entry=0x7ffff7f90380, nargs=nargs@entry=2, nresults=nresults@entry=1)
    at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/lua/executor.c:159
#9  0x000055555570ee65 in nlua_call_ref (ref=<optimized out>, name=<optimized out>, args=..., retval=true, err=0x7fffffffcfa0)
    at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/lua/executor.c:1580
#10 0x00005555558ae9a9 in decor_provider_invoke.constprop.0 (ns_id=32, name=name@entry=0x5555558c04a4 "buf", ref=<optimized out>, args=..., 
    perr=perr@entry=0x5555559bd8b8 <provider_err>, default_true=true) at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/decoration_provider.c:36
#11 0x000055555561eb54 in decor_providers_invoke_buf (buf=0x555555bc8050, providers=0x7fffffffd160, err=0x5555559bd8b8 <provider_err>)
    at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/decoration_provider.c:184
#12 0x00005555556348f5 in update_screen () at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/drawscreen.c:591
#13 0x0000555555642094 in ins_redraw (ready=22) at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/edit.c:1369
#14 0x000055555563ba52 in ins_redraw (ready=true) at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/edit.c:1291
#15 insert_check (state=0x7fffffffd310) at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/edit.c:480
#16 0x0000555555830fd2 in state_enter (s=0x7fffffffd310) at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/state.c:40
#17 0x0000555555638cd6 in insert_enter (s=0x7fffffffd310) at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/edit.c:336
#18 edit (cmdchar=<optimized out>, startln=<optimized out>, count=<optimized out>) at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/edit.c:1275
#19 0x0000555555779de9 in op_change (oap=0x7fffffffd708) at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/ops.c:2482
#20 0x0000555555782d14 in do_pending_operator (cap=0x7fffffffd770, old_col=45, gui_yank=false) at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/ops.c:6233
#21 0x00005555557645c0 in normal_finish_command (s=0x7fffffffd6f0) at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/normal.c:953
#22 normal_execute (state=0x7fffffffd6f0, key=<optimized out>) at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/normal.c:1213
#23 0x0000555555831087 in state_enter (s=0x7fffffffd6f0) at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/state.c:99
#24 0x0000555555763429 in normal_enter (cmdwin=<optimized out>, noexmode=<optimized out>) at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/normal.c:500
#25 0x000055555559c777 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/neovim/neovim-0.9.5/src/nvim/main.c:642
OrakMoya commented 5 months ago

Updating all plugins through Lazy fixed the issue.