Skip to content

x/tools/gopls/internal/lsp/template: panic - slice bounds out of range (crash) #57621

Closed
@kleinnic74

Description

@kleinnic74

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>

Activity

findleyr

findleyr commented on Dec 20, 2022

@findleyr
Member
added
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
on Dec 21, 2022
changed the title [-]gopls: automated issue report (crash)[/-] [+]x/tools/gopls/internal/lsp/template: panic - slice bounds out of range (crash)[/+] on Jan 5, 2023
transferred this issue fromgolang/vscode-goon Jan 5, 2023
added
ToolsThis label describes issues relating to any tools in the x/tools repository.
goplsIssues related to the Go language server, gopls.
on Jan 5, 2023
added this to the Unreleased milestone on Jan 5, 2023
findleyr

findleyr commented on Jan 5, 2023

@findleyr
Member
added
okay-after-beta1Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1
on Apr 17, 2023

25 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

NeedsFixThe path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.gopls/completionIssues related to auto-completion in gopls.okay-after-beta1Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @hyangah@pjweinb@adonovan@gopherbot@kleinnic74

      Issue actions

        x/tools/gopls/internal/lsp/template: panic - slice bounds out of range (crash) · Issue #57621 · golang/go