Closed
Description
#!stacks
"sigpanic" && "server.(*server).DidCreateFiles:+20"
Issue created by stacks.
// NewFile returns a document change to complete an empty go file.
func NewFile(ctx context.Context, snapshot *cache.Snapshot, fh file.Handle) (*protocol.DocumentChange, error) {
if bs, err := fh.Content(); err != nil || len(bs) != 0 {
return nil, err <----------- may return no result and no error
}
meta, err := snapshot.NarrowestMetadataForFile(ctx, fh.URI())
if err != nil {
return nil, err
}
This stack WhZjCw
was reported by telemetry:
crash/crash
runtime.gopanic:+69,+0x153
runtime.panicmem:=262,+0x2ff
runtime.sigpanic:+19,+0x2cc
golang.org/x/tools/gopls/internal/server.(*server).DidCreateFiles:+20,+0x1b0
golang.org/x/tools/gopls/internal/protocol.serverDispatch:+650,+0x2d87
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.ServerHandler.func4:+5,+0x73
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.handshaker.func5:+52,+0x68f
golang.org/x/tools/gopls/internal/protocol.Handlers.MustReplyHandler.func1:+2,+0xbf
golang.org/x/tools/gopls/internal/protocol.Handlers.AsyncHandler.func2.2:+3,+0x8f
runtime.goexit:+0,+0x3
golang.org/x/tools/gopls@v0.19.0-pre.2 go1.24.3 darwin/arm64 vscode (2)
golang.org/x/tools/gopls@v0.19.0-pre.1 go1.24.3 darwin/arm64 other (9)
golang.org/x/tools/gopls@v0.19.0-pre.2 go1.24.3 darwin/arm64 other (1)
Dups: 6JFvKA DO30IQ