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 with modules named "command-line-arguments" #61543
Comments
[Info - 4:26:38 PM] 2023/07/19 16:26:38 go/packages.Load golang/vscode-go#1: updating metadata for 593 packages panic: runtime error: invalid memory address or nil pointer dereference goroutine 3867 [running]: |
Hi @Martin-Jia are you able to reproduce this reliable? Is this on an open-source repository? |
Yes I can reproduce this reliable. This is not an open source repo. |
@Martin-Jia could you please try installing gopls@master? The panic has been enhanced with more information. It would be incredibly helpful if you could assist us in investigating.
CC @adonovan |
Thanks @findleyr [Info - 10:58:22 AM] 2023/07/21 10:58:22 go/packages.Load golang/vscode-go#6: updating metadata for 548 packages panic: runtime error: invalid memory address or nil pointer dereference goroutine 21960 [running]: |
We later found that the issue may potentially relate with the project module name. The module name used to be "command-line-arguments". After we changed it to another one, for example, github.com/x/y/z, the issue just disappeared. |
Aha! Thanks for the clue. Yes, I think that may do it. I'll try to reproduce and fix. |
gopls version: v0.12.4 (go1.20.6)
gopls flags:
update flags: proxy
extension version: 0.39.1
go version: 1.20.6
environment: Visual Studio Code linux
initialization error: undefined
issue timestamp: Wed, 19 Jul 2023 16:26:40 GMT
restart history:
Wed, 19 Jul 2023 16:26:31 GMT: activation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.
Failed to open any go file. It showed up that the gopls server crashed. Reopen window did not help.
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>
The text was updated successfully, but these errors were encountered: