Skip to content

x/tools/gopls: nil panic loading analysisNode.summary #66732

@jstbyte

Description

@jstbyte

gopls version: v0.15.2/go1.20.1
gopls flags:
update flags: proxy
extension version: 0.41.2
environment: Visual Studio Code win32
initialization error: undefined
issue timestamp: Sun, 07 Apr 2024 03:13:55 GMT
restart history:
Sun, 07 Apr 2024 03:01:06 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x40 pc=0x163a7fc]

goroutine 186 [running]:
golang.org/x/tools/gopls/internal/cache.(*Snapshot).Analyze(0x0, {0x1e17ad8, 0xc00082df50}, 0xc000219bf0, {0xc00017f800, 0xcc, 0xc000867d88%3F}, 0xc00048ea20)
	  analysis.go:461  0x139c
golang.org/x/tools/gopls/internal/golang.Analyze({0x1e17ad8, 0xc00082df50}, 0xc00007e240, 0xc0005a5560%3F, 0x1a4f8a0%3F)
	  diagnostics.go:42  0x16b
golang.org/x/tools/gopls/internal/server.(*server).diagnose.func6()
	  diagnostics.go:507  0xc5
created by golang.org/x/tools/gopls/internal/server.(*server).diagnose
	  diagnostics.go:502  0x10a5
gopls stats -anon { "DirStats": { "Files": 2, "TestdataFiles": 0, "GoFiles": 1, "ModFiles": 1, "Dirs": 1 }, "GOARCH": "amd64", "GOOS": "windows", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.20.1", "GoplsVersion": "v0.15.2", "InitialWorkspaceLoadDuration": "1.8348831s", "MemStats": { "HeapAlloc": 2531088, "HeapInUse": 5169152, "TotalAlloc": 12289392 }, "WorkspaceStats": { "Files": { "Total": 2, "Largest": 60, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.22.2", "AllPackages": { "Packages": 1, "LargestPackage": 1, "CompiledGoFiles": 1, "Modules": 1 }, "WorkspacePackages": { "Packages": 1, "LargestPackage": 1, "CompiledGoFiles": 1, "Modules": 1 }, "Diagnostics": 0 } ] } }

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>

Dups: 3DjTOg

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.gopls/analysisIssues related to running analysis in goplsgopls/telemetry-wins

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions