Skip to content

x/tools/gopls: panic in stubmethods with variadic args #61693

Closed
@danilotadeu

Description

@danilotadeu

gopls version: v0.13.0 (go1.20.6)
gopls flags:
update flags: proxy
extension version: 0.39.1
go version: 1.20.6
environment: Visual Studio Code darwin
initialization error: undefined
issue timestamp: Mon, 31 Jul 2023 23:39:18 GMT
restart history:
Mon, 31 Jul 2023 23:18:53 GMT: activation (enabled: true)
Mon, 31 Jul 2023 23:20:16 GMT: installation (enabled: true)
Mon, 31 Jul 2023 23:21:47 GMT: installation (enabled: true)
Mon, 31 Jul 2023 23:23:47 GMT: manual (enabled: true)
Mon, 31 Jul 2023 23:26:15 GMT: manual (enabled: true)
Mon, 31 Jul 2023 23:38:48 GMT: installation (enabled: true)
Mon, 31 Jul 2023 23:39:02 GMT: manual (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

panic: runtime error: index out of range [3] with length 1

goroutine 133 [running]:
go/types.(*Tuple).At(...)
	  tuple.go:31
golang.org/x/tools/gopls/internal/lsp/analysis/stubmethods.fromCallExpr(0x140045f34c0, 0x1400419da90, 0x3e1, 0x1400295dc80)
	  stubmethods.go:177  0x384
golang.org/x/tools/gopls/internal/lsp/analysis/stubmethods.GetStubInfo(0x1400295f170%3F, 0x3e1%3F, {0x14000242500%3F, 0x6, 0x8}, 0x1017a8d00%3F)
	  stubmethods.go:141  0xb0
golang.org/x/tools/gopls/internal/lsp/analysis/stubmethods.DiagnosticForError(0x14000392770%3F, 0x140003fe9c0%3F, 0x3e1, 0x429, {0x140001d6e00%3F, 0x6f%3F}, 0x14000782f20%3F)
	  stubmethods.go:85  0x88
golang.org/x/tools/gopls/internal/lsp.(*Server).codeAction(0x1400001b960%3F, {0x1017e2900%3F, 0x140000c25a0%3F}, 0x1400001b960)
	  code_action.go:206  0xee8
golang.org/x/tools/gopls/internal/lsp.(*Server).CodeAction(0x1400027c000%3F, {0x1017e2900%3F, 0x140000c25a0%3F}, 0x1016632a0%3F)
	  server_gen.go:16  0x24
golang.org/x/tools/gopls/internal/lsp/protocol.serverDispatch({0x1017e2900, 0x140000c25a0}, {0x1017f2428, 0x140004802a0}, 0x140003fe330, {0x1017e2bd8, 0x14000690240})
	  tsserver.go:239  0x18cc
golang.org/x/tools/gopls/internal/lsp/protocol.ServerHandler.func1({0x1017e2900, 0x140000c25a0}, 0x140003fe330, {0x1017e2bd8, 0x14000690240})
	  protocol.go:157  0x6c
golang.org/x/tools/gopls/internal/lsp/lsprpc.handshaker.func1({0x1017e2900, 0x140000c25a0}, 0x140003fe330, {0x1017e2bd8%3F, 0x14000690240%3F})
	  lsprpc.go:519  0x768
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1({0x1017e2900, 0x140000c25a0}, 0x140002a1158, {0x1017e2bd8%3F, 0x14000690240%3F})
	  handler.go:35  0xf0
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 - 20:39:05] 

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

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe 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.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions