Skip to content

gopls: automated issue report (crash) #1820

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

Closed
phanidevavarapu opened this issue Sep 29, 2021 · 1 comment
Closed

gopls: automated issue report (crash) #1820

phanidevavarapu opened this issue Sep 29, 2021 · 1 comment

Comments

@phanidevavarapu
Copy link

gopls version: v0.7.2
gopls flags:
update flags: proxy
extension version: 0.28.1
go version: 1.17.1
environment: Visual Studio Code darwin
initialization error: undefined
issue timestamp: Wed, 29 Sep 2021 23:16:15 GMT
restart history:
Wed, 29 Sep 2021 23:15:54 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

[Error - 4:16:07 PM] Connection to server got closed. Server will not be restarted.

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.

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x11bea20]

goroutine 5119 [running]:
go/types.(*Checker).handleBailout(0xc0003d48c0, 0xc006383698)
/usr/local/Cellar/go/1.17/libexec/src/go/types/check.go:245 +0x8b
panic({0x1852680, 0x1fa3dc0})
/usr/local/Cellar/go/1.17/libexec/src/runtime/panic.go:1038 +0x215
go/ast.(*Ident).Pos(0xc006382e28)
/usr/local/Cellar/go/1.17/libexec/src/go/ast/ast.go:469
go/types.spanOf({0x1a80860, 0x0})
/usr/local/Cellar/go/1.17/libexec/src/go/types/errors.go:243 +0x134
go/types.(*Checker).newError(0xc0003d48c0, {0x1a80860, 0x0}, 0x27, 0x0, {0xc00b7bad00, 0x33})
/usr/local/Cellar/go/1.17/libexec/src/go/types/errors.go:154 +0x4f
go/types.(*Checker).error(0xc00be86d20, {0x1a80860, 0x0}, 0x0, {0xc00b7bad00, 0x4b})
/usr/local/Cellar/go/1.17/libexec/src/go/types/errors.go:173 +0x35
go/types.(*Checker).errorf(0xc0003d48c0, {0x1a80860, 0x0}, 0xc00937e281, {0x1970abf, 0xc002d68f07}, {0x0, 0x0, 0x0})
/usr/local/Cellar/go/1.17/libexec/src/go/types/errors.go:177 +0x68
go/types.(*Checker).collectObjects.func1({0x1a81f80, 0xc006c2bbf0})
/usr/local/Cellar/go/1.17/libexec/src/go/types/resolver.go:279 +0xbfd
go/types.(*Checker).walkDecl(0x800000000000, {0x1a94cc0, 0xc003454c40}, 0xc000267568)
/usr/local/Cellar/go/1.17/libexec/src/go/types/decl.go:431 +0x1c7
go/types.(*Checker).walkDecls(0xc002d68f07, {0xc0037c9900, 0x6, 0x1}, 0x0)
/usr/local/Cellar/go/1.17/libexec/src/go/types/decl.go:418 +0x6a
go/types.(*Checker).collectObjects(0xc0003d48c0)
/usr/local/Cellar/go/1.17/libexec/src/go/types/resolver.go:252 +0x225
go/types.(*Checker).checkFiles(0xc0003d48c0, {0xc0044046d8, 0xc0070423c0, 0x2})
/usr/local/Cellar/go/1.17/libexec/src/go/types/check.go:263 +0xb5
go/types.(*Checker).Files(...)
/usr/local/Cellar/go/1.17/libexec/src/go/types/check.go:250
golang.org/x/tools/internal/lsp/cache.doTypeCheck({0x1a97ab8, 0xc003454ac0}, 0xc0058a3a00, 0xc0026f52c0, 0x2, 0xc00161e6c0, 0x1fc6760)
/Users/pdevavarapu/go/pkg/mod/golang.org/x/[email protected]/internal/lsp/cache/check.go:536 +0x893
golang.org/x/tools/internal/lsp/cache.typeCheck({0x1a97ab8, 0xc003454ac0}, 0xc0058a3a00, 0xc0026f52c0, 0x2, 0xc00161e6c0)
/Users/pdevavarapu/go/pkg/mod/golang.org/x/[email protected]/internal/lsp/cache/check.go:313 +0xe5
golang.org/x/tools/internal/lsp/cache.(*snapshot).buildPackageHandle.func1({0x1a97ab8, 0xc003454ac0}, {0x1a80e60, 0xc0058a3a00})
/Users/pdevavarapu/go/pkg/mod/golang.org/x/[email protected]/internal/lsp/cache/check.go:124 +0x23e
golang.org/x/tools/internal/memoize.(*Handle).run.func1()
/Users/pdevavarapu/go/pkg/mod/golang.org/x/[email protected]/internal/memoize/memoize.go:322 +0xa9
created by golang.org/x/tools/internal/memoize.(*Handle).run
/Users/pdevavarapu/go/pkg/mod/golang.org/x/[email protected]/internal/memoize/memoize.go:315 +0x1bd

Failed to auto-collect gopls trace: no gopls log.

@gopherbot gopherbot added this to the Untriaged milestone Sep 29, 2021
@findleyr
Copy link
Member

Hi, this is a known issue with go 1.17, that was fixed in go 1.17.1. Based on the GOROOT it looks like go 1.17, not 1.17.1, and at 1.17.1 that code does not try to position the ident:
https://cs.opensource.google/go/go/+/refs/tags/go1.17.1:src/go/types/resolver.go;l=279;drc=678b07d5e513a8bbe6780475e88bd92ed1b7b28a

Closing as this looks like a dupe of golang/go#48082. Please reopen if I'm missing something.

@golang golang locked and limited conversation to collaborators Sep 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants