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: panic #42077

Closed
bhcleek opened this issue Oct 19, 2020 · 1 comment
Closed

gopls: panic #42077

bhcleek opened this issue Oct 19, 2020 · 1 comment
Labels

Comments

@bhcleek
Copy link
Contributor

@bhcleek bhcleek commented Oct 19, 2020

What version of Go are you using (go version)?

$ go version
go version go1.15.2 darwin/amd64

Does this issue reproduce with the latest release?

Yes

$ gopls version 
golang.org/x/tools/gopls v0.5.1
    golang.org/x/tools/gopls@v0.5.1 h1:AF3Uh7HF08SZpKFfgJO6zfF3bbxyDXWqdkK4kMXiQ1o=

What operating system and processor architecture are you using (go env)?

─❯❯❯ go env GOOS
darwin
─❯❯❯ go env GOARCH
amd64

go env Output
$ go env

What did you do?

Sent a textDocument/didOpen, textDocument/didChange, textDocuments/definition and textDocument/references in quick succession

What did you expect to see?

A response from gopls

What did you see instead?

gopls panics:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x13e32fa]
goroutine 14123 [running]:
golang.org/x/tools/internal/lsp/source.IsGenerated(0x1aee6a0, 0xc009a144e0, 0x0, 0x0, 0xc00c73e720, 0x53, 0x0)
	/__REDACTED__/pkg/mod/golang.org/x/tools@v0.0.0-20200930165741-f1523d29dbb9/internal/lsp/source/util.go:90 +0x3a
golang.org/x/tools/internal/lsp.(*Server).didModifyFiles(0xc0001e21e0, 0x1aee6a0, 0xc009a144e0, 0xc011e50640, 0x1, 0x1, 0x1, 0x0, 0x0)
	/__REDACTED__/pkg/mod/golang.org/x/tools@v0.0.0-20200930165741-f1523d29dbb9/internal/lsp/text_synchronization.go:243 +0x136f
golang.org/x/tools/internal/lsp.(*Server).didChange(0xc0001e21e0, 0x1aee6a0, 0xc009a144e0, 0xc00b0d40c0, 0x0, 0x0)
	/__REDACTED__/pkg/mod/golang.org/x/tools@v0.0.0-20200930165741-f1523d29dbb9/internal/lsp/text_synchronization.go:117 +0x266
golang.org/x/tools/internal/lsp.(*Server).DidChange(0xc0001e21e0, 0x1aee6a0, 0xc009a144e0, 0xc00b0d40c0, 0xc00b0d40c0, 0x0)
	/__REDACTED__/pkg/mod/golang.org/x/tools@v0.0.0-20200930165741-f1523d29dbb9/internal/lsp/server_gen.go:36 +0x49
golang.org/x/tools/internal/lsp/protocol.serverDispatch(0x1aee6a0, 0xc009a144e0, 0x1b024c0, 0xc0001e21e0, 0xc00b0d4090, 0x9285a18, 0xc009a14240, 0x0, 0x1adbaa0, 0xc00140e0b0)
	/__REDACTED__/pkg/mod/golang.org/x/tools@v0.0.0-20200930165741-f1523d29dbb9/internal/lsp/protocol/tsserver.go:120 +0x1a7e
golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1(0x1aee6a0, 0xc009a144e0, 0xc00b0d4090, 0x9285a18, 0xc009a14240, 0x31e8a3834, 0x1f51b40)
	/__REDACTED__/pkg/mod/golang.org/x/tools@v0.0.0-20200930165741-f1523d29dbb9/internal/lsp/protocol/protocol.go:63 +0xc5
golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1(0x1aee6a0, 0xc009a144e0, 0xc00b0d4090, 0x9285a18, 0xc009a14240, 0x0, 0x0)
	/__REDACTED__/pkg/mod/golang.org/x/tools@v0.0.0-20200930165741-f1523d29dbb9/internal/lsp/lsprpc/lsprpc.go:557 +0x452
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1(0x1aee6a0, 0xc009a144e0, 0xc008d18440, 0x9285a18, 0xc009a14240, 0xc00b51af90, 0x1762b33)
	/__REDACTED__/pkg/mod/golang.org/x/tools@v0.0.0-20200930165741-f1523d29dbb9/internal/jsonrpc2/handler.go:35 +0xcf
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2(0xc00ef95200, 0xc00a47d860, 0xc0007c2300, 0x1aee6a0, 0xc009a144e0, 0xc008d18440, 0x9285a18, 0xc009a14240)
	/__REDACTED__/pkg/mod/golang.org/x/tools@v0.0.0-20200930165741-f1523d29dbb9/internal/jsonrpc2/handler.go:103 +0x86
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1
	/__REDACTED__/pkg/mod/golang.org/x/tools@v0.0.0-20200930165741-f1523d29dbb9/internal/jsonrpc2/handler.go:100 +0x173
@gopherbot gopherbot added the gopls label Oct 19, 2020
@heschik
Copy link
Contributor

@heschik heschik commented Oct 19, 2020

This probably works out to a duplicate of #41777, the fixes for which haven't been released yet.

@bhcleek bhcleek closed this Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.