Not planned
Description
gopls version: v0.8.2 (go1.17)
gopls flags:
update flags: proxy
extension version: 0.32.0
go version: 1.17
environment: Visual Studio Code win32
initialization error: undefined
issue timestamp: Wed, 06 Apr 2022 02:57:47 GMT
restart history:
Wed, 06 Apr 2022 02:57:30 GMT: activation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.
panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x0 pc=0xad4900] goroutine 420 [running]: go/types.(*Checker).handleBailout(0xc0050f2f00, 0xc00621f660) C:/Program check.go:245 0x8b panic({0x1246200, 0x1a9dbe0}) C:/Program panic.go:1038 0x215 go/ast.(*Ident).Pos(0xc00621edf0) C:/Program ast.go:469 go/types.spanOf({0x1554380, 0x0}) C:/Program errors.go:243 0x134 go/types.(*Checker).newError(0xc0050f2f00, {0x1554380, 0x0}, 0x27, 0x0, {0xc008d17380, 0x33}) C:/Program errors.go:154 0x4f go/types.(*Checker).error(0xc00c15e5a0, {0x1554380, 0x0}, 0x0, {0xc008d17380, 0x36}) C:/Program errors.go:173 0x35 go/types.(*Checker).errorf(0xc0050f2f00, {0x1554380, 0x0}, 0xc005a31fc1, {0x136f5c5, 0xc005f5f3c0}, {0x0, 0x0, 0x0}) C:/Program errors.go:177 0x68 go/types.(*Checker).collectObjects.func1({0x15559e0, 0xc0005ffe00}) C:/Program resolver.go:279 0xbfd go/types.(*Checker).walkDecl(0x800000000000, {0x1568820, 0xc000a9d500}, 0xc007c07530) C:/Program decl.go:431 0x1c7 go/types.(*Checker).walkDecls(0xc005f5f3c0, {0xc000a9d800, 0x4, 0x1}, 0x0) C:/Program decl.go:418 0x6a go/types.(*Checker).collectObjects(0xc0050f2f00) C:/Program resolver.go:252 0x225 go/types.(*Checker).checkFiles(0xc0050f2f00, {0xc0051413f0, 0xc0006e0b40, 0x0}) C:/Program check.go:263 0xb5 go/types.(*Checker).Files(...) C:/Program check.go:250 golang.org/x/tools/internal/lsp/cache.doTypeCheck({0x156b3d8, 0xc0008030c0}, 0xc000364120, 0xc001c84960, 0x2, 0xc0021f35f0, 0xc000068460) check.go:551 0x953 golang.org/x/tools/internal/lsp/cache.typeCheck({0x156b3d8, 0xc0008030c0}, 0xc000364120, 0xc001c84960, 0x2, 0x0) check.go:317 0xe5 golang.org/x/tools/internal/lsp/cache.(*snapshot).buildPackageHandle.func1({0x156b3d8, 0xc0008030c0}, {0x15549a0, 0xc000364120}) check.go:125 0x23e golang.org/x/tools/internal/memoize.(*Handle).run.func1() memoize.go:327 0xa9 created by golang.org/x/tools/internal/memoize.(*Handle).run memoize.go:320 0x1b0 [Error - 10:57:43]
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>
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
[-]gopls: automated issue report (crash)[/-][+]x/tools/gopls: unrecovered panic when type checking[/+]suzmue commentedon Apr 7, 2022
@crabxyj Thanks for filing an issue! Could you provide any more information about the code you were editing and what you were trying to do when this crash occurred?
findleyr commentedon Apr 11, 2022
This is a dupe of https://go.dev/issue/48082, and was fixed in go1.17.1. Could you please update your version of Go? Thanks.