Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: out of bounds panic in template completion #49600

Open
Gusted opened this issue Nov 15, 2021 · 4 comments
Open

x/tools/gopls: out of bounds panic in template completion #49600

Gusted opened this issue Nov 15, 2021 · 4 comments

Comments

@Gusted
Copy link
Contributor

@Gusted Gusted commented Nov 15, 2021

gopls version: v0.7.3
gopls flags: -rpc.trace
update flags: proxy
extension version: 2021.11.602
go version: 1.17.3
environment: VSCodium linux
initialization error: undefined
issue timestamp: Mon, 15 Nov 2021 13:01:52 GMT
restart history:
Mon, 15 Nov 2021 11:56:01 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

I was editing a .tmpl file, when the crash happend. To be more specific:

<table class="chroma" data-new-comment-url="{{if $.PageIsPullFiles}}{{$.Issue.HTMLURL}}/files/reviews/new_comment{{else}}{{$.CommitHTML}}/new_comment{{end}}">

My cursor was at the t of the last /new_comment(I was just typing that part) when the crash happens.

panic: runtime error: slice bounds out of range [5880:5878]

goroutine 166 [running]:
golang.org/x/tools/internal/lsp/template.(*completer).complete(0xc0079b2fb8)
	  completion.go:117  0xd85
golang.org/x/tools/internal/lsp/template.Completion({0xc0123794a0, 0xc005de8588}, {0xf9ddc0, 0xc000a0bc00}, {0xf8a850, 0xc015aa2960}, {0x14daf328, 0xc0}, {0x3ff0000000000000, {0x0, ...}})
	  completion.go:58  0x328
golang.org/x/tools/internal/lsp.(*Server).completion(0xc001ecebf8, {0xf74bb8, 0xc000380f00}, 0xc00a433220)
	  completion.go:37  0x17c
golang.org/x/tools/internal/lsp.(*Server).Completion(0xc000544000, {0xf74bb8, 0xc000380f00}, 0xc00a00)
	  server_gen.go:32  0x25
golang.org/x/tools/internal/lsp/protocol.serverDispatch({0xf74bb8, 0xc000380f00}, {0xfa2160, 0xc0003e7560}, 0xc0158caf60, {0xf74e20, 0xc000380e80})
	  tsserver.go:382  0x18dd
golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1({0xf74bb8, 0xc000380f00}, 0xc0158caf60, {0xf74e20, 0xc000380e80})
	  protocol.go:154  0x90
golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1({0xf74bb8, 0xc000380f00}, 0xc0158caf60, {0xf74e20, 0xc000380e80})
	  lsprpc.go:506  0xa7d
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1({0xf74bb8, 0xc000380f00}, 0xc0004b8690, {0xf74e20, 0xc000380e80})
	  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  0x20f
[Error - 2:01:37 PM] 
[Trace - 14:01:37.257 PM] Sending request 'textDocument/documentSymbol - (12)'.
Params: {"textDocument":{"uri":"file:///home/gusted/Desktop/coding/gitea/templates/repo/diff/box.tmpl"}}


panic: runtime error: slice bounds out of range [5880:5878]

goroutine 166 [running]:
golang.org/x/tools/internal/lsp/template.(*completer).complete(0xc0079b2fb8)
	/home/gusted/go/pkg/mod/golang.org/x/tools@v0.1.8-0.20211014194737-fc98fb2abd48/internal/lsp/template/completion.go:117 +0xd85
golang.org/x/tools/internal/lsp/template.Completion({0xc0123794a0, 0xc005de8588}, {0xf9ddc0, 0xc000a0bc00}, {0xf8a850, 0xc015aa2960}, {0x14daf328, 0xc0}, {0x3ff0000000000000, {0x0, ...}})
	/home/gusted/go/pkg/mod/golang.org/x/tools@v0.1.8-0.20211014194737-fc98fb2abd48/internal/lsp/template/completion.go:58 +0x328
golang.org/x/tools/internal/lsp.(*Server).completion(0xc001ecebf8, {0xf74bb8, 0xc000380f00}, 0xc00a433220)
	/home/gusted/go/pkg/mod/golang.org/x/tools@v0.1.8-0.20211014194737-fc98fb2abd48/internal/lsp/completion.go:37 +0x17c
golang.org/x/tools/internal/lsp.(*Server).Completion(0xc000544000, {0xf74bb8, 0xc000380f00}, 0xc00a00)
	/home/gusted/go/pkg/mod/golang.org/x/tools@v0.1.8-0.20211014194737-fc98fb2abd48/internal/lsp/server_gen.go:32 +0x25
golang.org/x/tools/internal/lsp/protocol.serverDispatch({0xf74bb8, 0xc000380f00}, {0xfa2160, 0xc0003e7560}, 0xc0158caf60, {0xf74e20, 0xc000380e80})
	/home/gusted/go/pkg/mod/golang.org/x/tools@v0.1.8-0.20211014194737-fc98fb2abd48/internal/lsp/protocol/tsserver.go:382 +0x18dd
golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1({0xf74bb8, 0xc000380f00}, 0xc0158caf60, {0xf74e20, 0xc000380e80})
	/home/gusted/go/pkg/mod/golang.org/x/tools@v0.1.8-0.20211014194737-fc98fb2abd48/internal/lsp/protocol/protocol.go:154 +0x90
golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1({0xf74bb8, 0xc000380f00}, 0xc0158caf60, {0xf74e20, 0xc000380e80})
	/home/gusted/go/pkg/mod/golang.org/x/tools@v0.1.8-0.20211014194737-fc98fb2abd48/internal/lsp/lsprpc/lsprpc.go:506 +0xa7d
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1({0xf74bb8, 0xc000380f00}, 0xc0004b8690, {0xf74e20, 0xc000380e80})
	/home/gusted/go/pkg/mod/golang.org/x/tools@v0.1.8-0.20211014194737-fc98fb2abd48/internal/jsonrpc2/handler.go:35 +0xf6
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2()
	/home/gusted/go/pkg/mod/golang.org/x/tools@v0.1.8-0.20211014194737-fc98fb2abd48/internal/jsonrpc2/handler.go:103 +0xa3
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1
	/home/gusted/go/pkg/mod/golang.org/x/tools@v0.1.8-0.20211014194737-fc98fb2abd48/internal/jsonrpc2/handler.go:100 +0x20f
[Error - 2:01:37 PM] Connection to server got closed. Server will not be restarted.
[Error - 2:01:37 PM] Request textDocument/completion failed.
Error: Connection got disposed.
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4909:25)
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:9694:35)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11902:38)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:14311:15)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11890:16)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4171:24)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at StreamMessageReader.fireClose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3218:27)
	at Socket.<anonymous> (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3301:42)
	at Socket.emit (events.js:327:22)
	at Pipe.<anonymous> (net.js:673:12)
[Error - 2:01:37 PM] Request textDocument/documentSymbol failed.
Error: Connection got disposed.
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4909:25)
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:9694:35)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11902:38)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:14311:15)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11890:16)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4171:24)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at StreamMessageReader.fireClose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3218:27)
	at Socket.<anonymous> (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3301:42)
	at Socket.emit (events.js:327:22)
	at Pipe.<anonymous> (net.js:673:12)
[Error - 2:01:37 PM] Request textDocument/codeAction failed.
Error: Connection got disposed.
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4909:25)
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:9694:35)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11902:38)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:14311:15)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11890:16)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4171:24)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at StreamMessageReader.fireClose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3218:27)
	at Socket.<anonymous> (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3301:42)
	at Socket.emit (events.js:327:22)
	at Pipe.<anonymous> (net.js:673:12)
[Error - 2:01:37 PM] Request textDocument/documentLink failed.
Error: Connection got disposed.
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4909:25)
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:9694:35)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11902:38)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:14311:15)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11890:16)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4171:24)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at StreamMessageReader.fireClose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3218:27)
	at Socket.<anonymous> (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3301:42)
	at Socket.emit (events.js:327:22)
	at Pipe.<anonymous> (net.js:673:12)
[Error - 2:01:37 PM] Request textDocument/foldingRange failed.
Error: Connection got disposed.
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4909:25)
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:9694:35)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11902:38)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:14311:15)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11890:16)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4171:24)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at StreamMessageReader.fireClose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3218:27)
	at Socket.<anonymous> (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3301:42)
	at Socket.emit (events.js:327:22)
	at Pipe.<anonymous> (net.js:673:12)
[Error - 2:01:37 PM] Request textDocument/codeLens failed.
Error: Connection got disposed.
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4909:25)
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:9694:35)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11902:38)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:14311:15)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11890:16)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4171:24)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at StreamMessageReader.fireClose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3218:27)
	at Socket.<anonymous> (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3301:42)
	at Socket.emit (events.js:327:22)
	at Pipe.<anonymous> (net.js:673:12)
[Error - 2:01:37 PM] Request textDocument/foldingRange failed.
Error: Connection got disposed.
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4909:25)
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:9694:35)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11902:38)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:14311:15)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11890:16)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4171:24)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at StreamMessageReader.fireClose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3218:27)
	at Socket.<anonymous> (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3301:42)
	at Socket.emit (events.js:327:22)
	at Pipe.<anonymous> (net.js:673:12)
[Error - 2:01:37 PM] Request textDocument/documentLink failed.
Error: Connection got disposed.
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4909:25)
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:9694:35)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11902:38)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:14311:15)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11890:16)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4171:24)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at StreamMessageReader.fireClose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3218:27)
	at Socket.<anonymous> (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3301:42)
	at Socket.emit (events.js:327:22)
	at Pipe.<anonymous> (net.js:673:12)
[Error - 2:01:37 PM] Request textDocument/foldingRange failed.
Error: Connection got disposed.
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4909:25)
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:9694:35)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11902:38)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:14311:15)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11890:16)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4171:24)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at StreamMessageReader.fireClose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3218:27)
	at Socket.<anonymous> (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3301:42)
	at Socket.emit (events.js:327:22)
	at Pipe.<anonymous> (net.js:673:12)
[Error - 2:01:37 PM] Request textDocument/codeLens failed.
Error: Connection got disposed.
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4909:25)
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:9694:35)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11902:38)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:14311:15)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11890:16)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4171:24)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at StreamMessageReader.fireClose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3218:27)
	at Socket.<anonymous> (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3301:42)
	at Socket.emit (events.js:327:22)
	at Pipe.<anonymous> (net.js:673:12)
[Error - 2:01:37 PM] Request textDocument/codeAction failed.
Error: Connection got disposed.
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4909:25)
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:9694:35)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11902:38)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:14311:15)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11890:16)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4171:24)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at StreamMessageReader.fireClose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3218:27)
	at Socket.<anonymous> (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3301:42)
	at Socket.emit (events.js:327:22)
	at Pipe.<anonymous> (net.js:673:12)
[Error - 2:01:37 PM] Request textDocument/documentSymbol failed.
Error: Connection got disposed.
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4909:25)
	at Object.dispose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:9694:35)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11902:38)
	at LanguageClient2.handleConnectionClosed (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:14311:15)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:11890:16)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at closeHandler (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:4171:24)
	at CallbackList.invoke (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3025:35)
	at Emitter.fire (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3076:34)
	at StreamMessageReader.fireClose (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3218:27)
	at Socket.<anonymous> (/home/gusted/.vscode-oss/extensions/golang.go-nightly-2021.11.602/dist/goMain.js:3301:42)
	at Socket.emit (events.js:327:22)
	at Pipe.<anonymous> (net.js:673:12)
@findleyr
Copy link
Contributor

@findleyr findleyr commented Nov 16, 2021

Thanks for the report, and details.

CC @pjweinb.

Loading

@findleyr
Copy link
Contributor

@findleyr findleyr commented Nov 16, 2021

Transfering to the Go issue tracker, since this is really a gopls bug.

Loading

@findleyr findleyr changed the title gopls: automated issue report (crash) x/tools/gopls: out of bounds panic in template completion Nov 16, 2021
@findleyr findleyr transferred this issue from golang/vscode-go Nov 16, 2021
@gopherbot gopherbot added this to the Unreleased milestone Nov 16, 2021
@findleyr findleyr removed this from the Unreleased milestone Nov 16, 2021
@findleyr findleyr added this to the gopls/on-deck milestone Nov 16, 2021
@pjweinb pjweinb self-assigned this Nov 16, 2021
@pjweinb
Copy link

@pjweinb pjweinb commented Nov 16, 2021

thank you for the report.

Loading

@pjweinb
Copy link

@pjweinb pjweinb commented Nov 16, 2021

i can reproduce the error and have found the cause. (That's the better news. Still have to figure out how to fix it (and why the tests didn't find this problem.)

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants