gopls: automated issue report (crash)
kettlecat6 opened this issue · comments
gopls version: v0.13.2/go1.22.5
gopls flags:
update flags: proxy
extension version: 0.41.4
environment: Visual Studio Code darwin
initialization error: undefined
issue timestamp: Fri, 05 Jul 2024 07:28:55 GMT
restart history:
Fri, 05 Jul 2024 07:27:21 GMT: activation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x1051dde68] goroutine 2953 [running]: golang.org/x/tools/gopls/internal/lsp/cache.localPackageKey({{0x14000c141c0, 0x37}, {0x14000c141c0, 0x37}, {0x14000c04194, 0xb}, {0x14001090c30, 0x1, 0x1}, {0x14001090c50, ...}, ...}) check.go:1402 0x748 golang.org/x/tools/gopls/internal/lsp/cache.(*packageHandleBuilder).buildPackageHandle(0x140018236b0, {0x10574b7a0, 0x140032de3c0}, 0x140000c2190) check.go:1090 0x224 golang.org/x/tools/gopls/internal/lsp/cache.(*snapshot).getPackageHandles.func2.1() check.go:891 0xb0 golang.org/x/sync/errgroup.(*Group).Go.func1() errgroup.go:75 0x58 created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 2931 errgroup.go:72 0x98
gopls stats -anon
gopls stats -anon failed after 301 ms. Please check if gopls is killed by OS.OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.
NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.
<OPTIONAL: ATTACH LOGS HERE>
as far as my mac, gopls panics at every go projects..
same on Win11 and wsl
Hi, thank you for the report. This is a duplicate of https://go.dev/issue/62191.
Your gopls version is quite old. Please upgrade to the latest version of gopls:
go install golang.org/x/tools/gopls@latest
Let us know if that doesn't fix the problem for you.