Skip to content

gopls: automated issue report (crash) #1738

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
benedictus-sofjan opened this issue Sep 1, 2021 · 1 comment
Closed

gopls: automated issue report (crash) #1738

benedictus-sofjan opened this issue Sep 1, 2021 · 1 comment

Comments

@benedictus-sofjan
Copy link

benedictus-sofjan commented Sep 1, 2021

gopls version: v0.7.1
gopls flags:
update flags: proxy
extension version: 0.27.1
go version: 1.17
environment: Visual Studio Code win32
initialization error: undefined
manual restart count: 0
total start count: 1

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

An alert box saying gopls has crashed appeared in the bottom right of my screen on VSCode.

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 0xc0000005 code=0x0 addr=0x0 pc=0xb05c60]

goroutine 26185 [running]:
go/types.(*Checker).handleBailout(0xc021c57180, 0xc0261f5698)
	C:/Program Files/Go/src/go/types/check.go:245 +0x8b
panic({0x11936c0, 0x18c8850})
	C:/Program Files/Go/src/runtime/panic.go:1038 +0x215
go/ast.(*Ident).Pos(0xc0261f4e28)
	C:/Program Files/Go/src/go/ast/ast.go:469
go/types.spanOf({0x13b5ac0, 0x0})
	C:/Program Files/Go/src/go/types/errors.go:243 +0x134
go/types.(*Checker).newError(0xc021c57180, {0x13b5ac0, 0x0}, 0x27, 0x0, {0xc02274ae80, 0x33})
	C:/Program Files/Go/src/go/types/errors.go:154 +0x4f
go/types.(*Checker).error(0x11584e0, {0x13b5ac0, 0x0}, 0x0, {0xc02274ae80, 0x27})
	C:/Program Files/Go/src/go/types/errors.go:173 +0x35
go/types.(*Checker).errorf(0xc021c57180, {0x13b5ac0, 0x0}, 0xc001dd8a81, {0x12afce1, 0xc00f086ff0}, {0x0, 0x0, 0x0})
	C:/Program Files/Go/src/go/types/errors.go:177 +0x68
go/types.(*Checker).collectObjects.func1({0x13b7020, 0xc015f107e0})
	C:/Program Files/Go/src/go/types/resolver.go:279 +0xbfd
go/types.(*Checker).walkDecl(0x800000000000, {0x13c96c0, 0xc00c5ab580}, 0xc0261f5568)
	C:/Program Files/Go/src/go/types/decl.go:431 +0x1c7
go/types.(*Checker).walkDecls(0xc00f086ff0, {0xc00c5ab700, 0x3, 0x1}, 0x0)
	C:/Program Files/Go/src/go/types/decl.go:418 +0x6a
go/types.(*Checker).collectObjects(0xc021c57180)
	C:/Program Files/Go/src/go/types/resolver.go:252 +0x225
go/types.(*Checker).checkFiles(0xc021c57180, {0xc01f269600, 0xc033a6df90, 0x2})
	C:/Program Files/Go/src/go/types/check.go:263 +0xb5
go/types.(*Checker).Files(...)
	C:/Program Files/Go/src/go/types/check.go:250
golang.org/x/tools/internal/lsp/cache.doTypeCheck({0x13cc2b8, 0xc0329150c0}, 0xc01ea58500, 0xc001394c30, 0x2, 0xc01b97a720, 0x1285d9d)
	C:/Users/bened/go/pkg/mod/golang.org/x/[email protected]/internal/lsp/cache/check.go:544 +0x893
golang.org/x/tools/internal/lsp/cache.typeCheck({0x13cc2b8, 0xc0329150c0}, 0xc01ea58500, 0xc001394c30, 0x2, 0x12613b7)
	C:/Users/bened/go/pkg/mod/golang.org/x/[email protected]/internal/lsp/cache/check.go:321 +0xe5
golang.org/x/tools/internal/lsp/cache.(*snapshot).buildPackageHandle.func1({0x13cc2b8, 0xc0329150c0}, {0x13b60c0, 0xc01ea58500})
	C:/Users/bened/go/pkg/mod/golang.org/x/[email protected]/internal/lsp/cache/check.go:124 +0x23e
golang.org/x/tools/internal/memoize.(*Handle).run.func1()
	C:/Users/bened/go/pkg/mod/golang.org/x/[email protected]/internal/memoize/memoize.go:322 +0xa9
created by golang.org/x/tools/internal/memoize.(*Handle).run
	C:/Users/bened/go/pkg/mod/golang.org/x/[email protected]/internal/memoize/memoize.go:315 +0x1bd
[Error - 10:54:44 AM] Connection to server got closed. Server will not be restarted.
Failed to auto-collect gopls trace: no gopls log.

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.

I am working in a private repository.

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

findleyr commented Sep 1, 2021

Thanks for the report.

This is a dupe of golang/go#48082. Were you by any chance typing "init" into an import declaration?

Sorry for the crash. This should be fixed in go1.17.1.

@findleyr findleyr closed this as completed Sep 1, 2021
@golang golang locked and limited conversation to collaborators Sep 1, 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