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) #2113

Closed
nicolasparada opened this issue Mar 16, 2022 · 5 comments
Closed

gopls: automated issue report (crash) #2113

nicolasparada opened this issue Mar 16, 2022 · 5 comments
Labels
FrozenDueToAge gopls gopls related issues upstream-tools Issues that are caused by problems in the tools that the extension depends on.
Milestone

Comments

@nicolasparada
Copy link

gopls version: v0.8.1 (go1.18)
gopls flags:
update flags: proxy
extension version: 0.32.0
go version: 1.18
environment: Visual Studio Code darwin
initialization error: undefined
issue timestamp: Wed, 16 Mar 2022 18:06:38 GMT
restart history:
Wed, 16 Mar 2022 18:06:29 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

panic: runtime error: slice bounds out of range [482:37]

goroutine 3437 [running]:
golang.org/x/tools/internal/lsp/template.(*Parsed).RuneCount(0x1400216cc80%3F, 0x26a%3F, 0x0%3F, 0x280%3F)
	  parse.go:301  0xd0
golang.org/x/tools/internal/lsp/template.SemanticTokens({0x100fd8548%3F, 0x14006cb4000%3F}, {0x100fdfd28%3F, 0x14000346240%3F}, {0x14000338690%3F, 0x0%3F}, 0x14000859558, 0x14000859548)
	  implementations.go:169  0x2f0
golang.org/x/tools/internal/lsp.(*Server).computeSemanticTokens(0x14000000360, {0x100fd8548%3F, 0x14006cb4000}, {{0x1400215bc20%3F, 0x1%3F}}, 0x0)
	  semantic.go:89  0x714
golang.org/x/tools/internal/lsp.(*Server).semanticTokensFull(...)
	  semantic.go:40
golang.org/x/tools/internal/lsp.(*Server).SemanticTokensFull(0x14006db1140%3F, {0x100fd8548%3F, 0x14006cb4000%3F}, 0x100e98fa0%3F)
	  server_gen.go:240  0x38
golang.org/x/tools/internal/lsp/protocol.serverDispatch({0x100fd8548, 0x14006cb4000}, {0x100fe23d8, 0x14000000360}, 0x14002fa7830, {0x100fd87b0, 0x14003bf5f80})
	  tsserver.go:304  0x394c
golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1({0x100fd8548, 0x14006cb4000}, 0x14002fa7830, {0x100fd87b0, 0x14003bf5f80})
	  protocol.go:154  0x70
golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1({0x100fd8548, 0x14006cb4000}, 0x14002fa7830, {0x100fd87b0%3F, 0x14003bf5f80%3F})
	  lsprpc.go:506  0x788
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1({0x100fd8548, 0x14006cb4000}, 0x14002d40990, {0x100fd87b0%3F, 0x14003bf5f80%3F})
	  handler.go:35  0xf4
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2()
	  handler.go:103  0x90
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1
	  handler.go:100  0x1dc
[Error - 3:06:34 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>

@nicolasparada
Copy link
Author

Additional info:
I have this setting enabled:

{
    "gopls": {
        "ui.semanticTokens": true
    }
}

@gopherbot gopherbot added this to the Untriaged milestone Mar 16, 2022
@suzmue suzmue added the gopls gopls related issues label Mar 16, 2022
@suzmue suzmue modified the milestones: Untriaged, v0.33.0 Mar 16, 2022
@findleyr
Copy link
Contributor

@nicolasparada could you share anything about the code you were editing when this happened?

(things like non-ascii characters might be relevant)

@suzmue suzmue added the upstream-tools Issues that are caused by problems in the tools that the extension depends on. label Mar 16, 2022
@suzmue suzmue removed this from the v0.33.0 milestone Mar 16, 2022
@gopherbot gopherbot added this to the Untriaged milestone Mar 16, 2022
@nicolasparada
Copy link
Author

nicolasparada commented Mar 16, 2022

It was a simple template file (.tmpl). Let me try to replicate it.

@nicolasparada
Copy link
Author

I uninstalled the extension, reinstalled it, and reinstalled the go tools, and disabled semanticTokens.
And it has been working fine now.

Enabling semanticTokens now doesn't give me any error. Cannot replicate so far.

@suzmue
Copy link
Contributor

suzmue commented Mar 17, 2022

Closing because the upstream issue is now fixed golang/go#51731. It will be in the next gopls release.

@suzmue suzmue closed this as completed Mar 17, 2022
@golang golang locked and limited conversation to collaborators Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls gopls related issues upstream-tools Issues that are caused by problems in the tools that the extension depends on.
Projects
None yet
Development

No branches or pull requests

4 participants