Skip to content

Buf language server constantly crashing #507

@1514599514

Description

@1514599514
buf.exe --version
1.61.0

output:

Command "lsp" is deprecated, use "buf lsp serve" instead. However, "buf beta lsp" will continue to work.
WARN This command is in beta. It is unstable and likely to change. To suppress this warning, set BUF_BETA_SUPPRESS_WARNINGS=1
INFO file updated {"uri":"d:\goProject\test_grpc\helloworld\helloworld.proto","old_version":0,"new_version":1}
INFO parsing IR for file {"uri":"file:///d%3A/goProject/test_grpc/helloworld/helloworld.proto","version":1}
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x28 pc=0x22c649e]

goroutine 50 [running]:
github.com/bufbuild/buf/private/buf/buflsp.(*file).RefreshIR.func2(...)
github.com/bufbuild/buf/private/buf/buflsp/file.go:262
buf.build/go/standard/xslices.Filter...
buf.build/go/[email protected]/xslices/xslices.go:36
github.com/bufbuild/buf/private/buf/buflsp.(*file).RefreshIR(0xc0000d0f28, {0x2da37f0, 0xc0003d9540})
github.com/bufbuild/buf/private/buf/buflsp/file.go:261 +0xa3e
github.com/bufbuild/buf/private/buf/buflsp.(*file).Update(0xc0000d0f28, {0x2da37f0, 0xc0003d9540}, 0x1, {0xc00016c900, 0x1f3})
github.com/bufbuild/buf/private/buf/buflsp/file.go:167 +0x345
github.com/bufbuild/buf/private/buf/buflsp.(*server).DidOpen(0xc0005b0e60?, {0x2da37f0, 0xc0003d9540}, 0xc0000bac80)
github.com/bufbuild/buf/private/buf/buflsp/server.go:216 +0x69
go.lsp.dev/protocol.serverDispatch({0x2da37f0, 0xc0003d9540}, {0x2e086f0, 0xc0000aa160}, 0xc00070fec0, {0x26574946a80, 0xc0005c4120})
go.lsp.dev/[email protected]/server.go:314 +0x2516
github.com/bufbuild/buf/private/buf/buflsp.(*lsp).newHandler.ServerHandler.func2({0x2da37f0, 0xc0003d9540}, 0xc00070fec0, {0x26574946a80, 0xc0005c4120})
go.lsp.dev/[email protected]/server.go:36 +0x7d
github.com/bufbuild/buf/private/buf/buflsp.(*lsp).newHandler.func1({0x2da37f0, 0xc0003d9540}, 0xc0005119b0, {0x26574946a80, 0xc0005c4120})
github.com/bufbuild/buf/private/buf/buflsp/buflsp.go:145 +0x323
github.com/bufbuild/buf/private/buf/buflsp.(*lsp).newHandler.AsyncHandler.func3.2()
go.lsp.dev/[email protected]/handler.go:114 +0x76
created by github.com/bufbuild/buf/private/buf/buflsp.(*lsp).newHandler.AsyncHandler.func3 in goroutine 14
go.lsp.dev/[email protected]/handler.go:112 +0x165
[Info - 12:41:36] Connection to server got closed. Server will restart.
true
[Error - 12:41:36] Server process exited with code 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions