x/tools/gopls: panic in semantic tokens #51731
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Copying this issue from @nicolasparada in vscode-go repo (golang/vscode-go#2113):
gopls version: v0.8.1 (go1.18)
gopls flags:
update flags: proxy
extension version: 0.32.0
go version: 1.18
environment: Visual Studio Code darwin
initialization error: undefined
issue timestamp: Wed, 16 Mar 2022 18:06:38 GMT
restart history:
Wed, 16 Mar 2022 18:06:29 GMT: activation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.
panic: runtime error: slice bounds out of range [482:37]
goroutine 3437 [running]:
golang.org/x/tools/internal/lsp/template.(*Parsed).RuneCount(0x1400216cc80%3F, 0x26a%3F, 0x0%3F, 0x280%3F)
parse.go:301 0xd0
golang.org/x/tools/internal/lsp/template.SemanticTokens({0x100fd8548%3F, 0x14006cb4000%3F}, {0x100fdfd28%3F, 0x14000346240%3F}, {0x14000338690%3F, 0x0%3F}, 0x14000859558, 0x14000859548)
implementations.go:169 0x2f0
golang.org/x/tools/internal/lsp.(*Server).computeSemanticTokens(0x14000000360, {0x100fd8548%3F, 0x14006cb4000}, {{0x1400215bc20%3F, 0x1%3F}}, 0x0)
semantic.go:89 0x714
golang.org/x/tools/internal/lsp.(*Server).semanticTokensFull(...)
semantic.go:40
golang.org/x/tools/internal/lsp.(*Server).SemanticTokensFull(0x14006db1140%3F, {0x100fd8548%3F, 0x14006cb4000%3F}, 0x100e98fa0%3F)
server_gen.go:240 0x38
golang.org/x/tools/internal/lsp/protocol.serverDispatch({0x100fd8548, 0x14006cb4000}, {0x100fe23d8, 0x14000000360}, 0x14002fa7830, {0x100fd87b0, 0x14003bf5f80})
tsserver.go:304 0x394c
golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1({0x100fd8548, 0x14006cb4000}, 0x14002fa7830, {0x100fd87b0, 0x14003bf5f80})
protocol.go:154 0x70
golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1({0x100fd8548, 0x14006cb4000}, 0x14002fa7830, {0x100fd87b0%3F, 0x14003bf5f80%3F})
lsprpc.go:506 0x788
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1({0x100fd8548, 0x14006cb4000}, 0x14002d40990, {0x100fd87b0%3F, 0x14003bf5f80%3F})
handler.go:35 0xf4
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2()
handler.go:103 0x90
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1
handler.go:100 0x1dc
[Error - 3:06:34 PM]
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>
The text was updated successfully, but these errors were encountered: