golang / vscode-go

Go extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=golang.Go
Other
3.84k stars 734 forks source link

gopls: automated issue report (crash) #3448

Closed prasanth-avua closed 1 month ago

prasanth-avua commented 1 month ago

gopls version: v0.16.1/go1.22.5 gopls flags: update flags: proxy extension version: 0.41.4 environment: Visual Studio Code darwin initialization error: undefined issue timestamp: Fri, 12 Jul 2024 09:52:32 GMT restart history: Fri, 12 Jul 2024 03:21:38 GMT: activation (enabled: true) Fri, 12 Jul 2024 04:20:50 GMT: installation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

panic:   stmt.go:932: assertion failed

goroutine 70450 [running]:
go/types.(*Checker).handleBailout(0x1400befd400, 0x1400c523878)
      check.go:367  0x9c
panic({0x1030633a0%3F, 0x1400c00a260%3F})
      panic.go:770  0x124
go/types.assert(0x80%3F)
      errors.go:28  0x60
go/types.(*Checker).rangeStmt(0x1400befd400, 0x3, 0x1400b390960)
      stmt.go:932  0xb58
go/types.(*Checker).stmt(0x1400befd400, 0x0, {0x1031ece80, 0x1400b390960})
      stmt.go:827  0x874
go/types.(*Checker).stmtList(0x1400befd400, 0x0, {0x1400b511500%3F, 0x0%3F, 0x0%3F})
      stmt.go:121  0x88
go/types.(*Checker).funcBody(0x1400befd400, 0x1031ea588%3F, {0x1400a1792f0%3F, 0x140000e8380%3F}, 0x140057b1040, 0x1400b5e8660, {0x0%3F, 0x0%3F})
      stmt.go:41  0x21c
go/types.(*Checker).funcDecl.func1()
      decl.go:852  0x44
go/types.(*Checker).processDelayed(0x1400befd400, 0x0)
      check.go:467  0x12c
go/types.(*Checker).checkFiles(0x1400befd400, {0x1400583f180, 0x7, 0x8})
      check.go:411  0x188
go/types.(*Checker).Files(...)
      check.go:372
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).checkPackage(0x1400b2d3860, {0x1031ee168, 0x1400b73ce10}, 0x1400b5f1c20)
      check.go:1543  0x788
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).handleSyntaxPackage(0x1400b2d3860, {0x1031ee168, 0x1400b73ce10}, 0x0, {0x1400038e780, 0x31})
      check.go:568  0x534
golang.org/x/tools/gopls/internal/cache.(*Snapshot).forEachPackageInternal.func2()
      check.go:418  0x34
golang.org/x/sync/errgroup.(*Group).Go.func1()
      errgroup.go:78  0x58
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 69560
      errgroup.go:75  0x98
gopls stats -anon gopls stats -anon failed after 1449 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.
prasanth-avua commented 1 month ago

crashed

findleyr commented 1 month ago

Thanks for the report. This is a duplicate of golang/go#68334, and should be fixed by the Go 1.22.6 release.