Skip to content

gopls: automated issue report (crash) #3452

Closed as not planned
Closed as not planned
@Kristianwhittick

Description

@Kristianwhittick

gopls version: v0.16.1/go1.22.5
gopls flags:
update flags: proxy
extension version: 0.41.4
environment: Visual Studio Code linux
initialization error: undefined
issue timestamp: Mon, 15 Jul 2024 10:35:15 GMT
restart history:
Mon, 15 Jul 2024 10:34:46 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

In VSCode, I changed the folder from an existing go project to a different existing go project.
A few seconds later the gopls server crashed.

panic:   stmt.go:932: assertion failed

goroutine 900 [running]:
go/types.(*Checker).handleBailout(0xc00120ae00, 0xc00156b898)
	  check.go:367  0x88
panic({0xe9b560%3F, 0xc000bf93e0%3F})
	  panic.go:770  0x132
go/types.assert(0x0%3F)
	  errors.go:28  0x54
go/types.(*Checker).rangeStmt(0xc00120ae00, 0x3, 0xc00040fda0)
	  stmt.go:932  0xe70
go/types.(*Checker).stmt(0xc00120ae00, 0x3, {0x1319688, 0xc00040fda0})
	  stmt.go:827  0xab9
go/types.(*Checker).stmtList(0xc00120ae00, 0x3, {0xc0009c7050%3F, 0x1018987%3F, 0x5%3F})
	  stmt.go:121  0x85
go/types.(*Checker).stmt(0xc00120ae00, 0x3, {0x1319628, 0xc000f18e70})
	  stmt.go:562  0x20f2
go/types.(*Checker).rangeStmt(0xc00120ae00, 0x3, 0xc00040fe00)
	  stmt.go:993  0x74d
go/types.(*Checker).stmt(0xc00120ae00, 0x0, {0x1319688, 0xc00040fe00})
	  stmt.go:827  0xab9
go/types.(*Checker).stmtList(0xc00120ae00, 0x0, {0xc000364900%3F, 0x0%3F, 0x0%3F})
	  stmt.go:121  0x85
go/types.(*Checker).funcBody(0xc00120ae00, 0x1315b10%3F, {0xc000887264%3F, 0x19acaa0%3F}, 0xc00038e440, 0xc000f18ea0, {0x0%3F, 0x0%3F})
	  stmt.go:41  0x331
go/types.(*Checker).funcDecl.func1()
	  decl.go:852  0x3a
go/types.(*Checker).processDelayed(0xc00120ae00, 0x0)
	  check.go:467  0x162
go/types.(*Checker).checkFiles(0xc00120ae00, {0xc000a8e6e8, 0x1, 0x1})
	  check.go:411  0x1cc
go/types.(*Checker).Files(...)
	  check.go:372
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).checkPackage(0xc001558a20, {0x131aa28, 0xc001079770}, 0xc001030900)
	  check.go:1543  0xa25
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).handleSyntaxPackage(0xc001558a20, {0x131aa28, 0xc001079770}, 0x0, {0xc0005281e0, 0x9})
	  check.go:568  0x5e5
golang.org/x/tools/gopls/internal/cache.(*Snapshot).forEachPackageInternal.func2()
	  check.go:418  0x2b
golang.org/x/sync/errgroup.(*Group).Go.func1()
	  errgroup.go:78  0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 802
	  errgroup.go:75  0x96
gopls stats -anon gopls stats -anon failed after 2301 ms. Please check if gopls is killed by OS.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions