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: CodeAction: nil panic in findMatchingDiagnostics #71028

Open
adonovan opened this issue Dec 26, 2024 · 2 comments
Open

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

adonovan opened this issue Dec 26, 2024 · 2 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

#!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/[email protected] go1.23.1 darwin/arm64 other (1)
@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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

3 participants