vscode-go
vscode-go copied to clipboard
gopls: automated issue report (crash)
gopls version: v0.16.0/go1.22.4 gopls flags: update flags: proxy extension version: 0.41.4 environment: Visual Studio Code win32 initialization error: undefined issue timestamp: Sun, 30 Jun 2024 13:32:19 GMT restart history: Sun, 30 Jun 2024 12:57:39 GMT: activation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.
panic: runtime error: slice bounds out of range [8:7]
goroutine 122 [running]:
golang.org/x/tools/gopls/internal/golang/completion.Selection.Suffix(...)
completion.go:367
golang.org/x/tools/gopls/internal/server.toProtocolCompletionItems({0xc00041c588, 0x3, 0x0%3F}, 0xc000239cc0, 0xc000436508)
completion.go:114 0x9f0
golang.org/x/tools/gopls/internal/server.(*server).Completion(0xc000120600, {0x1daf008, 0xc000376c30}, 0xc0003be4b0)
completion.go:76 0x68e
golang.org/x/tools/gopls/internal/protocol.serverDispatch({0x1daf040, 0xc000310690}, {0x1dca7f0, 0xc000120600}, 0xc0003766f0, {0x1daf200, 0xc00030eec0})
tsserver.go:361 0x2587
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.ServerHandler.func3({0x1daf040, 0xc000310690}, 0xc0003766f0, {0x1daf200, 0xc00030eec0})
protocol.go:160 0x85
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.handshaker.func4({0x1daf040, 0xc000310690}, 0xc0003766f0, {0x1daf200, 0xc00030eec0})
lsprpc.go:509 0x923
golang.org/x/tools/gopls/internal/protocol.Handlers.MustReplyHandler.func1({0x1daf040, 0xc000310690}, 0xc000247a28, {0x1daf200, 0xc00030eec0})
handler.go:35 0xc6
golang.org/x/tools/gopls/internal/protocol.Handlers.AsyncHandler.func2.2()
handler.go:103 0x96
created by golang.org/x/tools/gopls/internal/protocol.Handlers.AsyncHandler.func2 in goroutine 113
handler.go:100 0x1c5
gopls stats -anon
{ "DirStats": { "Files": 23766, "TestdataFiles": 0, "GoFiles": 0, "ModFiles": 0, "Dirs": 4149 }, "GOARCH": "amd64", "GOOS": "windows", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.22.4", "GoplsVersion": "v0.16.0", "InitialWorkspaceLoadDuration": "373.9995ms", "MemStats": { "HeapAlloc": 1738480, "HeapInUse": 3817472, "TotalAlloc": 15910192 }, "WorkspaceStats": { "Files": { "Total": 0, "Largest": 0, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.22.4", "AllPackages": { "Packages": 0, "LargestPackage": 0, "CompiledGoFiles": 0, "Modules": 0 }, "WorkspacePackages": { "Packages": 0, "LargestPackage": 0, "CompiledGoFiles": 0, "Modules": 0 }, "Diagnostics": 0 } ] } }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>