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/internal/lsp/mod: invalid memory address or nil pointer dereference (crash) #57625

Closed
aliyadollahi opened this issue Jan 3, 2023 · 2 comments
Assignees
Labels
FrozenDueToAge 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

@aliyadollahi
Copy link

gopls version: v0.11.0 (go1.19.2)
gopls flags:
update flags: proxy
extension version: 0.37.0
go version: 1.19.2
environment: Visual Studio Code linux
initialization error: undefined
issue timestamp: Tue, 03 Jan 2023 13:50:57 GMT
restart history:
Tue, 03 Jan 2023 12:08:08 GMT: activation (enabled: true)
Tue, 03 Jan 2023 12:19:48 GMT: installation (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=0x30 pc=0xb8307d]

goroutine 167 [running]:
golang.org/x/tools/gopls/internal/lsp/mod.hoverOnModuleStatement({0x10e0860%3F, 0xc0004cbef0%3F}, 0xc0004cbef0%3F, 0x10e0ac8%3F, {0x10ecbd8%3F, 0xc00040e840%3F}, {0x10e0ac8%3F, 0xc0003fd490%3F})
	  hover.go:128  0x5d
golang.org/x/tools/gopls/internal/lsp/mod.Hover({0x10e07b8, 0xc000388140}, {0x10ecbd8, 0xc00040e840}, {0x10e0ac8, 0xc0003fd490}, {0x4cbe30%3F, 0xc0%3F})
	  hover.go:50  0x35f
golang.org/x/tools/gopls/internal/lsp.(*Server).hover(0xcfcce0%3F, {0x10e07b8, 0xc000388140}, 0xc0004cbe30)
	  hover.go:25  0x152
golang.org/x/tools/gopls/internal/lsp.(*Server).Hover(0xc000266070%3F, {0x10e07b8%3F, 0xc000388140%3F}, 0xcfcce0%3F)
	  server_gen.go:140  0x25
golang.org/x/tools/gopls/internal/lsp/protocol.serverDispatch({0x10e07b8, 0xc000388140}, {0x10f05a0, 0xc000166500}, 0xc0004cbe00, {0x10e0ba8, 0xc0003880c0})
	  tsserver.go:397  0xca6
golang.org/x/tools/gopls/internal/lsp/protocol.ServerHandler.func1({0x10e07b8, 0xc000388140}, 0xc0004cbe00, {0x10e0ba8, 0xc0003880c0})
	  protocol.go:157  0x90
golang.org/x/tools/gopls/internal/lsp/lsprpc.handshaker.func1({0x10e07b8, 0xc000388140}, 0xc0004cbe00, {0x10e0ba8%3F, 0xc0003880c0%3F})
	  lsprpc.go:519  0xa39
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1({0x10e07b8, 0xc000388140}, 0xc0004cd4d0, {0x10e0ba8%3F, 0xc0003880c0%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 - 5:20:53 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>

@hyangah hyangah added the gopls Issues related to the Go language server, gopls. label Jan 5, 2023
@hyangah hyangah changed the title gopls: automated issue report (crash) x/tools/gopls/internal/lsp/mod: invalid memory address or nil pointer dereference (crash) Jan 5, 2023
@hyangah
Copy link
Contributor

hyangah commented Jan 5, 2023

Thanks! Transferring to gopls issue tracker to triage.
Would be helpful if you can share your go, and gopls related settings.

@hyangah hyangah transferred this issue from golang/vscode-go Jan 5, 2023
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Jan 5, 2023
@gopherbot gopherbot added this to the Unreleased milestone Jan 5, 2023
@jamalc jamalc assigned jamalc and adonovan and unassigned jamalc Jan 5, 2023
@jamalc jamalc modified the milestones: Unreleased, gopls/v0.12.0 Jan 5, 2023
@gopherbot
Copy link

Change https://go.dev/cl/460858 mentions this issue: gopls/internal/lsp/mod: fix nil panic in go.mod hover

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

5 participants