Skip to content
New issue

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

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

Already on GitHub? # to your account

x/tools/gopls: CodeAction: nil panic in findMatchingDiagnostics #71028

Closed
adonovan opened this issue Dec 26, 2024 · 3 comments
Closed

x/tools/gopls: CodeAction: nil panic in findMatchingDiagnostics #71028

adonovan opened this issue Dec 26, 2024 · 3 comments
Assignees
Labels
gopls/telemetry-wins gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@adonovan
Copy link
Member

adonovan commented Dec 26, 2024

#!stacks
"sigpanic" && "findMatchingDiagnostics:+5"

Issue created by stacks.

func (s *server) findMatchingDiagnostics(uri protocol.DocumentURI, pd protocol.Diagnostic) []*cache.Diagnostic {
	s.diagnosticsMu.Lock()
	defer s.diagnosticsMu.Unlock()

	var sds []*cache.Diagnostic
	for _, viewDiags := range s.diagnostics[uri].byView {   // nil deref panic

This stack mX6OTg was reported by telemetry:

golang.org/x/tools/gopls@v0.17.0 go1.23.1 darwin/arm64 other (1)

Dups: NgriWw

@adonovan adonovan added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. gopls/telemetry-wins labels Dec 26, 2024
@gopherbot gopherbot added this to the Unreleased milestone Dec 26, 2024
@adonovan adonovan modified the milestones: Unreleased, gopls/v0.17.2 Dec 26, 2024
@adonovan adonovan self-assigned this Dec 30, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/639396 mentions this issue: gopls/internal/server: fix nil panic in findMatchingDiagnostics

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
gopls/telemetry-wins gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants