Skip to content

gopls: automated issue report (crash) #2121

Closed
@ghost

Description

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: Fri, 18 Mar 2022 17:49:28 GMT
restart history:
Fri, 18 Mar 2022 17:49:23 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 SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x1775752]

goroutine 115 [running]:
golang.org/x/tools/internal/lsp/cache.parseGoWork({0x1c01bd8, 0xc0002cd2f0}, {0xc00032a390, 0x30}, {0xc000664100%3F, 0xc0004e6ec0%3F}, {0xc00064e400, 0x0, 0x200}, {0x1bfb300, ...})
	  workspace.go:508  0x232
golang.org/x/tools/internal/lsp/cache.loadExplicitWorkspaceFile({0x1c01bd8, 0xc0002cd2f0}, 0xc00065e480, {0x1bfb300%3F, 0xc00061a080%3F})
	  workspace.go:152  0x1e6
golang.org/x/tools/internal/lsp/cache.newWorkspace({0x1c01bd8, 0xc0002cd2f0}, {0xc00032a390, 0x30}, {0x1bfb300, 0xc00061a080}, 0xc000650540, 0x0, 0x0)
	  workspace.go:106  0xbb
golang.org/x/tools/internal/lsp/cache.(*Session).createView(0xc00061a080, {0x1c01bd8, 0xc0002cd2f0}, {0xc000039e10, 0xd}, {0xc000120510, 0x30}, 0xc0001e0240, 0x0)
	  session.go:197  0x25d
golang.org/x/tools/internal/lsp/cache.(*Session).NewView(0xc00061a080, {0x1c01bd8, 0xc0002cd2f0}, {0xc000039e10, 0xd}, {0xc000120510, 0x30}, 0xc000481590%3F)
	  session.go:166  0x287
golang.org/x/tools/internal/lsp.(*Server).addView(0xc0002ce000, {0x1c01bd8, 0xc0002cd2f0}, {0xc000039e10, 0xd}, {0xc000120510, 0x30})
	  workspace.go:42  0x1c7
golang.org/x/tools/internal/lsp.(*Server).addFolders(0xc0002ce000, {0x1c01bd8%3F, 0xc0002cd2f0}, {0xc0002c3940, 0x1, 0x1%3F})
	  general.go:234  0x6f5
golang.org/x/tools/internal/lsp.(*Server).initialized(0xc0002ce000, {0x1c01bd8, 0xc0002cd2f0}, 0xc0004da090%3F)
	  general.go:186  0x2fa
golang.org/x/tools/internal/lsp.(*Server).Initialized(0xc0006b0830%3F, {0x1c01bd8%3F, 0xc0002cd2f0%3F}, 0x1859da0%3F)
	  server_gen.go:156  0x25
golang.org/x/tools/internal/lsp/protocol.serverDispatch({0x1c01bd8, 0xc0002cd2f0}, {0x1c0cd40, 0xc0002ce000}, 0xc000373cb0, {0x1c01dd0, 0xc0002cd230})
	  tsserver.go:140  0x6d3
golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1({0x1c01bd8, 0xc0002cd2f0}, 0xc000373cb0, {0x1c01dd0, 0xc0002cd230})
	  protocol.go:154  0x90
golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1({0x1c01bd8, 0xc0002cd2f0}, 0xc000373cb0, {0x1c01dd0%3F, 0xc0002cd230%3F})
	  lsprpc.go:506  0xa43
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1({0x1c01bd8, 0xc0002cd2f0}, 0xc0002a89f0, {0x1c01dd0%3F, 0xc0002cd230%3F})
	  handler.go:35  0xf6
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2()
	  handler.go:103  0xa3
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1
	  handler.go:100  0x20a
[Error - 8:49:23 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>

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions