Closed
Description
gopls version: v0.11.0 (go1.19.3)
gopls flags:
update flags: proxy
extension version: 0.37.0
go version: 1.19.3
environment: Visual Studio Code win32
initialization error: undefined
issue timestamp: Tue, 20 Dec 2022 12:17:00 GMT
restart history:
Tue, 20 Dec 2022 09:27:58 GMT: activation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.
panic: runtime error: slice bounds out of range [39:37] goroutine 163 [running]: golang.org/x/tools/gopls/internal/lsp/template.(*completer).complete(0xc001ea7350) completion.go:116 0xd05 golang.org/x/tools/gopls/internal/lsp/template.Completion({0xc0016cd740%3F, 0xc001a4b048%3F}, {0x164d118%3F, 0xc0009a0160%3F}, {0x1644920, 0xc0004b7ce0}, {0x0%3F, 0x0%3F}, {0x1, {0x0, ...}}) completion.go:55 0x30e golang.org/x/tools/gopls/internal/lsp.(*Server).completion(0x1257ec0%3F, {0x1640c78, 0xc000192300}, 0xc0018d5d10) completion.go:43 0x31d golang.org/x/tools/gopls/internal/lsp.(*Server).Completion(0xc000196320%3F, {0x1640c78%3F, 0xc000192300%3F}, 0x1257ec0%3F) server_gen.go:28 0x25 golang.org/x/tools/gopls/internal/lsp/protocol.serverDispatch({0x1640c78, 0xc000192300}, {0x1650ae0, 0xc00037a100}, 0xc0018d2270, {0x1641068, 0xc000192280}) tsserver.go:269 0x20c2 golang.org/x/tools/gopls/internal/lsp/protocol.ServerHandler.func1({0x1640c78, 0xc000192300}, 0xc0018d2270, {0x1641068, 0xc000192280}) protocol.go:157 0x90 golang.org/x/tools/gopls/internal/lsp/lsprpc.handshaker.func1({0x1640c78, 0xc000192300}, 0xc0018d2270, {0x1641068%3F, 0xc000192280%3F}) lsprpc.go:519 0xa39 golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1({0x1640c78, 0xc000192300}, 0xc00028e378, {0x1641068%3F, 0xc000192280%3F}) handler.go:35 0xf6 golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2() handler.go:103 0xa3 created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1 handler.go:100 0x20a [Error - 13:16:48]
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>
Metadata
Metadata
Assignees
Labels
The path to resolution is known, but the work has not been done.This label describes issues relating to any tools in the x/tools repository.Issues related to the Go language server, gopls.Issues related to auto-completion in gopls.Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1
Type
Projects
Relationships
Development
No branches or pull requests
Activity
findleyr commentedon Dec 20, 2022
CC @pjweinb
[-]gopls: automated issue report (crash)[/-][+]x/tools/gopls/internal/lsp/template: panic - slice bounds out of range (crash)[/+]findleyr commentedon Jan 5, 2023
CC @pjweinb
25 remaining items