x/tools/gopls: CodeAction: nil panic in findMatchingDiagnostics
adonovan opened this issue · 2 comments
adonovan commented
#!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 panicThis stack mX6OTg was reported by telemetry:
crash/crashruntime.gopanic:+69runtime.panicmem:=262runtime.sigpanic:+19golang.org/x/tools/gopls/internal/server.(*server).findMatchingDiagnostics:+5golang.org/x/tools/gopls/internal/server.(*server).codeActionsMatchingDiagnostics:+21golang.org/x/tools/gopls/internal/server.(*server).CodeAction:+148golang.org/x/tools/gopls/internal/protocol.serverDispatch:+160golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.ServerHandler.func3:+5golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.handshaker.func4:+52golang.org/x/tools/gopls/internal/protocol.Handlers.MustReplyHandler.func1:+2golang.org/x/tools/gopls/internal/protocol.Handlers.AsyncHandler.func2.2:+3runtime.goexit:+0
golang.org/x/tools/gopls@v0.17.0 go1.23.1 darwin/arm64 other (1)
gabyhelp commented
Related Issues
- x/tools/gopls: crash in Hover (telemetry) #69362
- x/tools/gopls: analysisinternal.ZeroValue crash on (presumably) unsafe.Pointer #70585 (closed)
- x/tools/gopls: Hover: panic in lookup{ObjectByName,DocLinkSymbol} #69616
- x/tools/gopls: OOB index crash in completion.expectedReturnStmtType #70636 (closed)
- x/tools/gopls: nil Signature (?) deref in Completion #70634 (closed)
- x/tools/gopls: completion: failed type assertion in inferExpectedTypeArg #70889 (closed)
- x/tools/gopls: automated issue report (crash) #66174 (closed)
- x/tools/gopls: Hover: nil deref in golang.StdSymbolOf #70969
- x/tools/gopls: panic in token.File.Name within PackageDocHTML (telemetry) #70149 (closed)
- x/tools/gopls: stubmethods: nil deref of FuncType.Results in fromReturnStmt #70967
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
gopherbot commented
Change https://go.dev/cl/639396 mentions this issue: gopls/internal/server: fix nil panic in findMatchingDiagnostics