Skip to content

x/tools/gopls: crash in internal/lsp.(*Server).handleFatalErrors (v0.5.1) #42240

@mellaught

Description

@mellaught

gopls version: v0.5.1
gopls flags:

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=0x8 pc=0x4b9845]

goroutine 32 [running]:
os.(*fileStat).Name(0x0, 0xc00097c840, 0x40)
	  types.go:108  0x5
golang.org/x/tools/internal/lsp.(*Server).handleFatalErrors.func1(0xc00097c840, 0x40, 0xeee8c0, 0x0, 0xed6280, 0xc001d9eab0, 0x0, 0x0)
	  diagnostics.go:400  0x45
path/filepath.walk(0xc00097c380, 0x3c, 0xeee8c0, 0xc0004a0000, 0xc001d656e8, 0x0, 0x1)
	  path.go:380  0x213
path/filepath.Walk(0xc00097c380, 0x3c, 0xc001d656e8, 0x3c, 0x5)
	  path.go:406  0x106
golang.org/x/tools/internal/lsp.(*Server).handleFatalErrors(0xc000078320, 0xee9140, 0xc00033ccc0, 0xefe780, 0xc0000f4240, 0xed5b60, 0xc000820b40, 0xed5b60, 0xc000820b40, 0xc00033cd50)
	  diagnostics.go:399  0x11b
golang.org/x/tools/internal/lsp.(*Server).diagnose(0xc000078320, 0xee9740, 0xc0003120d0, 0xefe780, 0xc0000f4240, 0xc000292000, 0x0, 0x0)
	  diagnostics.go:115  0xb58
golang.org/x/tools/internal/lsp.(*Server).diagnoseDetached(0xc000078320, 0xefe780, 0xc0000f4240)
	  diagnostics.go:36  0xdb
golang.org/x/tools/internal/lsp.(*Server).addFolders.func3(0xc000078320, 0xefe780, 0xc0000f4240, 0xc00060f890, 0xc000161190, 0xc00028bed0)
	  general.go:224  0x46
created by golang.org/x/tools/internal/lsp.(*Server).addFolders
	  general.go:223  0xc7d
[Error - 13:32:05] 

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

No one assigned

    Labels

    FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions