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: crash in work.Hover #60821

Closed
Kidkender opened this issue Jun 13, 2023 · 2 comments
Closed

x/tools/gopls: crash in work.Hover #60821

Kidkender opened this issue Jun 13, 2023 · 2 comments
Assignees
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@Kidkender
Copy link

gopls version: v0.12.2 (go1.20.2)
gopls flags:
update flags: proxy
extension version: 0.38.0
go version: 1.20.2
environment: Visual Studio Code linux
initialization error: undefined
issue timestamp: Tue, 13 Jun 2023 13:42:18 GMT
restart history:
Tue, 13 Jun 2023 12:53:20 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xcaf96b]

goroutine 182 [running]:
golang.org/x/tools/gopls/internal/lsp/work.Hover({0x1156918, 0xc0005a78f0}, {0x1163c10, 0xc000180900}, {0x11577a0, 0xc00049df80}, {0x0%3F, 0x0%3F})
	  hover.go:55  0x48b
golang.org/x/tools/gopls/internal/lsp.(*Server).hover(0xd5a940%3F, {0x1156870, 0xc00028c9b0}, 0xc0005a7740)
	  hover.go:36  0x3e6
golang.org/x/tools/gopls/internal/lsp.(*Server).Hover(0xc0002e2460%3F, {0x1156870%3F, 0xc00028c9b0%3F}, 0xd5a940%3F)
	  server_gen.go:136  0x25
golang.org/x/tools/gopls/internal/lsp/protocol.serverDispatch({0x1156870, 0xc00028c9b0}, {0x1167550, 0xc0003a64e0}, 0xc0005a76e0, {0x1156b48, 0xc000201900})
	  tsserver.go:395  0xca6
golang.org/x/tools/gopls/internal/lsp/protocol.ServerHandler.func1({0x1156870, 0xc00028c9b0}, 0xc0005a76e0, {0x1156b48, 0xc000201900})
	  protocol.go:157  0x90
golang.org/x/tools/gopls/internal/lsp/lsprpc.handshaker.func1({0x1156870, 0xc00028c9b0}, 0xc0005a76e0, {0x1156b48%3F, 0xc000201900%3F})
	  lsprpc.go:519  0x9f9
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1({0x1156870, 0xc00028c9b0}, 0xc000012e58, {0x1156b48%3F, 0xc000201900%3F})
	  handler.go:35  0xf6
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2()
	  handler.go:103  0xa3
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1
	  handler.go:100  0x20a
[Error - 8:42:05 PM] 

OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.

NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.

<OPTIONAL: ATTACH LOGS HERE>

@findleyr findleyr changed the title gopls: automated issue report (crash) x/tools/gopls: crash in work.Hover Jun 15, 2023
@findleyr
Copy link
Contributor

Thanks for the report. This looks like a new panic: we'll fix in the next release.

@findleyr findleyr transferred this issue from golang/vscode-go Jun 15, 2023
@findleyr findleyr self-assigned this Jun 15, 2023
@findleyr findleyr added this to the gopls/v0.12.3 milestone Jun 15, 2023
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Jun 15, 2023
@gopherbot gopherbot modified the milestones: gopls/v0.12.3, Unreleased Jun 15, 2023
@findleyr findleyr modified the milestones: Unreleased, gopls/v0.12.3 Jun 15, 2023
@gopherbot
Copy link

Change https://go.dev/cl/503436 mentions this issue: gopls/internal/lsp/work: don't crash when hovering over broken mod dir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Issues related to the Go language server, gopls. 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