Closed timoffex closed 7 months ago
Thank you for reporting. This is also reported as golang/go#65952.
This will be fixed today, and we will cut v0.15.1 with the fix soon (most likely today or tomorrow).
This is fixed in the next prerelease:
go install golang.org/x/tools/gopls@v0.15.1-pre.1
We'll release the fix as v0.15.1 tomorrow. Given that this crash only occurs with invalid code (a return value without a corresponding result parameter), we decided to wait one more day in case there are additional crash patterns reported. Nevertheless, I can see how this crash would be relatively easy to encounter, so we want to release the fix soon.
The pre-release solves this problem for me too.
Gopls v0.15.1 is released, with a fix: https://github.com/golang/tools/releases/tag/gopls%2Fv0.15.1
go install golang.org/x/tools/gopls@v0.15.1
Leaving this open for today, for visibility.
gopls version: v0.15.0/go1.21.6 gopls flags: update flags: proxy extension version: 0.41.1 environment: Visual Studio Code darwin initialization error: undefined issue timestamp: Mon, 26 Feb 2024 23:28:43 GMT restart history: Mon, 26 Feb 2024 23:24:50 GMT: activation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.
I was defining a new method and got a notification that gopls crashed. The crash is very consistent and happens after I type out "new*" as below, press backspace once or twice, and press Escape to exit the Vim extension's insert mode.
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 and error messages from that window and paste it in this issue.
Failed to auto-collect gopls trace: incomplete panic trace.
gopls stats -anon
{ "DirStats": { "Files": 176805, "TestdataFiles": 8, "GoFiles": 140, "ModFiles": 3, "Dirs": 22615 }, "GOARCH": "arm64", "GOOS": "darwin", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.21.6", "GoplsVersion": "v0.15.0", "InitialWorkspaceLoadDuration": "58.183208ms", "MemStats": { "HeapAlloc": 3688760, "HeapInUse": 6807552, "TotalAlloc": 46907088 }, "WorkspaceStats": { "Files": { "Total": 0, "Largest": 0, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.21.6", "AllPackages": { "Packages": 0, "LargestPackage": 0, "CompiledGoFiles": 0, "Modules": 0 }, "WorkspacePackages": { "Packages": 0, "LargestPackage": 0, "CompiledGoFiles": 0, "Modules": 0 }, "Diagnostics": 0 } ] } }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.