-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: crash in PackageStats #40224
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
Comments
Thanks for the detailed report! To confirm, this is with @heschik: Looks like this is crashing in the call to ast.Inspect. I guess we need a case to handle a nil file. |
Yup! I've updated (and reinstalled the entire extension) several times to verify.
|
Change https://golang.org/cl/242797 mentions this issue: |
Thanks! |
You can try it out now by installing |
I've been working with them for a few hours now. Seems to be working perfectly, thanks! |
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed:
Go language server (gopls) restarts several times and crashes most of them. Occasionally it will stay alive for a few minutes (before crashing again).
Please attach the stack trace from the crash.
A window with the error message should have popped up in the lower half of your screen.
Please copy the stack trace from that window and paste it in this issue.
Additional Information:
I believe this issue is related to
PackageStats
. I was poking around on the debug site mentioned here https://github.com/golang/tools/blob/master/gopls/doc/vscode.md#build-tags (localhost:6060)When I loaded the cache tab [ http://localhost:6060/cache/1 ] (as the segfault seems to be on a cache access above):
The page had the follow text
""
Cache 1
memoize.Store entries
cache.actionHandleKey - 31
cache.packageHandleKey - 891
cache.parseKey - 4042
source.FileIdentity - 1
Per-package usage - not accurate, for guidance only
template: :7:2: executing "body" at <.PackageStats>: error calling PackageStats: runtime error: invalid memory address or nil pointer dereference
"""
There's no chance this can come from the codebase I'm working on, correct? This does not seem to be related to any changes made in our repo, and reverting pretty far back in time does not fix the issue.
I can provide more information if needed, but I would have to redact some pieces, so please let me know what is helpful! I tend to use moderately basic features (autocomplete, go to def/type/impl), so if there are portions of the Go extension that I can disable entirely, that might also serve as a good workaround. Thanks!
The text was updated successfully, but these errors were encountered: