Skip to content

x/tools/gopls: crash in typeparams.Free.Has (empty type set) #68213

Closed
@IvanBelyakoff

Description

@IvanBelyakoff

gopls version: v0.16.0/go1.22.3
gopls flags:
update flags: proxy
extension version: 0.41.4
environment: Visual Studio Code darwin
initialization error: undefined
issue timestamp: Thu, 27 Jun 2024 11:16:18 GMT
restart history:
Mon, 24 Jun 2024 09:52:12 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

panic: empty type set

goroutine 10038 [running]:
golang.org/x/tools/internal/typeparams.(*Free).Has(0x1400a0e7038, {0x101ca13d0, 0x14009d8f8b0})
	  free.go:86  0x66c
golang.org/x/tools/internal/typeparams.(*Free).Has(0x1400a0e7038, {0x101ca2528, 0x1400a306b60})
	  free.go:111  0x534
golang.org/x/tools/internal/typeparams.(*Free).Has(0x1400a0e7038, {0x101ca2410, 0x1400aad8ae0})
	  free.go:52  0x6bc
golang.org/x/tools/internal/typeparams.(*Free).Has(0x1400a0e7038, {0x101ca2528, 0x1400a306d20})
	  free.go:111  0x534
golang.org/x/tools/gopls/internal/golang.computeSizeOffsetInfo(0x1400aa21980, {0x1400a94db80, 0x4, 0x21e2%3F}, {0x101cb2f98, 0x14009d8f590%3F})
	  hover.go:1405  0xc4
golang.org/x/tools/gopls/internal/golang.hover({0x101ca6108, 0x1400bf40c90}, 0x1400a75f9e0, {0x101ca8e20, 0x1400a1bf620}, {0xa0e75e0%3F, 0x140%3F})
	  hover.go:318  0x9d4
golang.org/x/tools/gopls/internal/golang.Hover({0x101ca6108%3F, 0x1400bf40ab0%3F}, 0x1400a75f9e0, {0x101ca8e20, 0x1400a1bf620}, {0x4%3F, 0x0%3F}, 0x0)
	  hover.go:107  0x8c
golang.org/x/tools/gopls/internal/server.(*server).Hover(0x14000192600, {0x101ca6108, 0x1400bf40ab0}, 0x1400bf40810)
	  hover.go:51  0x2dc
golang.org/x/tools/gopls/internal/protocol.serverDispatch({0x101ca6140, 0x1400a55d590}, {0x101cc0050, 0x14000192600}, 0x1400bf407e0, {0x101ca6300, 0x14007d8a100})
	  tsserver.go:503  0xc70
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.ServerHandler.func3({0x101ca6140, 0x1400a55d590}, 0x1400bf407e0, {0x101ca6300, 0x14007d8a100})
	  protocol.go:160  0x74
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.handshaker.func4({0x101ca6140, 0x1400a55d590}, 0x1400bf407e0, {0x101ca6300, 0x14007d8a100})
	  lsprpc.go:509  0x6e0
golang.org/x/tools/gopls/internal/protocol.Handlers.MustReplyHandler.func1({0x101ca6140, 0x1400a55d590}, 0x1400a5695a8, {0x101ca6300, 0x14007d8a100})
	  handler.go:35  0xc0
golang.org/x/tools/gopls/internal/protocol.Handlers.AsyncHandler.func2.2()
	  handler.go:103  0x90
created by golang.org/x/tools/gopls/internal/protocol.Handlers.AsyncHandler.func2 in goroutine 118
	  handler.go:100  0x19c
gopls stats -anon { "DirStats": { "Files": 11991, "TestdataFiles": 3, "GoFiles": 7496, "ModFiles": 4, "Dirs": 1669 }, "GOARCH": "arm64", "GOOS": "darwin", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.22.3", "GoplsVersion": "v0.16.0", "InitialWorkspaceLoadDuration": "3.408558708s", "MemStats": { "HeapAlloc": 110704344, "HeapInUse": 157474816, "TotalAlloc": 1666178736 }, "WorkspaceStats": { "Files": { "Total": 6634, "Largest": 8827634, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.22.3", "AllPackages": { "Packages": 1343, "LargestPackage": 166, "CompiledGoFiles": 7230, "Modules": 240 }, "WorkspacePackages": { "Packages": 3, "LargestPackage": 22, "CompiledGoFiles": 45, "Modules": 1 }, "Diagnostics": 0 } ] } }

Metadata

Metadata

Assignees

Labels

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