9fans / acme-lsp

Language Server Protocol tools for the acme text editor
MIT License
193 stars 25 forks source link

@ imports crash L hov / L assist in js #80

Open Superpat opened 2 weeks ago

Superpat commented 2 weeks ago

This happens whenever I use L hov or L assist on the filename part of an import

like import { useFlashMessage } from '@/stores/FlashMessage';

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x59878d]

goroutine 1 [running]:
9fans.net/acme-lsp/internal/lsp/acmelsp.(*RemoteCmd).Hover(0xc0000c5b98, {0x65dc10, 0x7b49c0})
    /home/patrick/go/pkg/mod/9fans.net/acme-lsp@v0.12.0/internal/lsp/acmelsp/remote.go:197 +0xad
9fans.net/acme-lsp/internal/lsp/acmelsp.(*outputWin).Update(0xc00007da40, 0xc0001ba9e0?, {0x6615f8?, 0xc0000109f0?}, {0x614988?, 0xc0000a7c01?})
    /home/patrick/go/pkg/mod/9fans.net/acme-lsp@v0.12.0/internal/lsp/acmelsp/assist.go:234 +0x265
9fans.net/acme-lsp/internal/lsp/acmelsp.Assist({0x65ca48, 0xc0000c0110}, {0x614988, 0x4})
    /home/patrick/go/pkg/mod/9fans.net/acme-lsp@v0.12.0/internal/lsp/acmelsp/assist.go:270 +0x3cf
main.run(0xc000000180, {0xc000014050, 0x1, 0x1})
    /home/patrick/go/pkg/mod/9fans.net/acme-lsp@v0.12.0/cmd/L/main.go:187 +0x84f
main.main()
    /home/patrick/go/pkg/mod/9fans.net/acme-lsp@v0.12.0/cmd/L/main.go:117L: exit 2
 +0x65

Now this doesnt happen with every project, I have a different one where this works fine, but I'll have to inspect some more.