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

gopls: automated issue report (crash) #3440

Closed
red1374 opened this issue Jun 30, 2024 · 1 comment
Closed

gopls: automated issue report (crash) #3440

red1374 opened this issue Jun 30, 2024 · 1 comment
Milestone

Comments

@red1374
Copy link

red1374 commented Jun 30, 2024

gopls version: v0.16.0/go1.22.4
gopls flags:
update flags: proxy
extension version: 0.41.4
environment: Visual Studio Code win32
initialization error: undefined
issue timestamp: Sun, 30 Jun 2024 13:32:19 GMT
restart history:
Sun, 30 Jun 2024 12:57:39 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

panic: runtime error: slice bounds out of range [8:7]

goroutine 122 [running]:
golang.org/x/tools/gopls/internal/golang/completion.Selection.Suffix(...)
	  completion.go:367
golang.org/x/tools/gopls/internal/server.toProtocolCompletionItems({0xc00041c588, 0x3, 0x0%3F}, 0xc000239cc0, 0xc000436508)
	  completion.go:114  0x9f0
golang.org/x/tools/gopls/internal/server.(*server).Completion(0xc000120600, {0x1daf008, 0xc000376c30}, 0xc0003be4b0)
	  completion.go:76  0x68e
golang.org/x/tools/gopls/internal/protocol.serverDispatch({0x1daf040, 0xc000310690}, {0x1dca7f0, 0xc000120600}, 0xc0003766f0, {0x1daf200, 0xc00030eec0})
	  tsserver.go:361  0x2587
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.ServerHandler.func3({0x1daf040, 0xc000310690}, 0xc0003766f0, {0x1daf200, 0xc00030eec0})
	  protocol.go:160  0x85
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.handshaker.func4({0x1daf040, 0xc000310690}, 0xc0003766f0, {0x1daf200, 0xc00030eec0})
	  lsprpc.go:509  0x923
golang.org/x/tools/gopls/internal/protocol.Handlers.MustReplyHandler.func1({0x1daf040, 0xc000310690}, 0xc000247a28, {0x1daf200, 0xc00030eec0})
	  handler.go:35  0xc6
golang.org/x/tools/gopls/internal/protocol.Handlers.AsyncHandler.func2.2()
	  handler.go:103  0x96
created by golang.org/x/tools/gopls/internal/protocol.Handlers.AsyncHandler.func2 in goroutine 113
	  handler.go:100  0x1c5
gopls stats -anon { "DirStats": { "Files": 23766, "TestdataFiles": 0, "GoFiles": 0, "ModFiles": 0, "Dirs": 4149 }, "GOARCH": "amd64", "GOOS": "windows", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.22.4", "GoplsVersion": "v0.16.0", "InitialWorkspaceLoadDuration": "373.9995ms", "MemStats": { "HeapAlloc": 1738480, "HeapInUse": 3817472, "TotalAlloc": 15910192 }, "WorkspaceStats": { "Files": { "Total": 0, "Largest": 0, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.22.4", "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.

<OPTIONAL: ATTACH LOGS HERE>

@gopherbot gopherbot added this to the Untriaged milestone Jun 30, 2024
@hyangah
Copy link
Contributor

hyangah commented Jul 1, 2024

Thanks for the report @red1374
Duplicate of golang/go#68169 - happens when completion is triggered on the package line.

Gopls v0.16.1 includes the fix and will be released this week.

@hyangah hyangah closed this as not planned Won't fix, can't repro, duplicate, stale Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants