Skip to content

gopls: automated issue report (crash) #3492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Luke2486 opened this issue Aug 16, 2024 · 1 comment
Closed

gopls: automated issue report (crash) #3492

Luke2486 opened this issue Aug 16, 2024 · 1 comment
Milestone

Comments

@Luke2486
Copy link

gopls version: v0.16.1/go1.22.5
gopls flags:
update flags: proxy
extension version: 0.42.0
environment: Visual Studio Code darwin
initialization error: undefined
issue timestamp: Fri, 16 Aug 2024 08:49:21 GMT
restart history:
Fri, 16 Aug 2024 08:49:05 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

panic:   stmt.go:932: assertion failed

goroutine 70105 [running]:
go/types.(*Checker).handleBailout(0x1402067d400, 0x140146db878)
	  check.go:367  0x9c
panic({0x1054df3a0%3F, 0x1400ca79f40%3F})
	  panic.go:770  0x124
go/types.assert(0x0%3F)
	  errors.go:28  0x60
go/types.(*Checker).rangeStmt(0x1402067d400, 0x3, 0x1401d0f69c0)
	  stmt.go:932  0xb58
go/types.(*Checker).stmt(0x1402067d400, 0x0, {0x105668e80, 0x1401d0f69c0})
	  stmt.go:827  0x874
go/types.(*Checker).stmtList(0x1402067d400, 0x0, {0x1401a544cc0%3F, 0x0%3F, 0x140146db6d8%3F})
	  stmt.go:121  0x88
go/types.(*Checker).funcBody(0x1402067d400, 0x1056653b8%3F, {0x14025b819b0%3F, 0x1401226b1a0%3F}, 0x140012a3580, 0x140094fac90, {0x0%3F, 0x0%3F})
	  stmt.go:41  0x21c
go/types.(*Checker).funcDecl.func1()
	  decl.go:852  0x44
go/types.(*Checker).processDelayed(0x1402067d400, 0x0)
	  check.go:467  0x12c
go/types.(*Checker).checkFiles(0x1402067d400, {0x140020c5100, 0xf, 0x10})
	  check.go:411  0x188
go/types.(*Checker).Files(...)
	  check.go:372
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).checkPackage(0x1401dc83ce0, {0x10566a168, 0x1401a3783c0}, 0x14009bad320)
	  check.go:1543  0x788
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).handleSyntaxPackage(0x1401dc83ce0, {0x10566a168, 0x1401a3783c0}, 0x0, {0x14002098d68, 0x12})
	  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 66911
	  errgroup.go:75  0x98
gopls stats -anon { "DirStats": { "Files": 4213, "TestdataFiles": 0, "GoFiles": 63, "ModFiles": 1, "Dirs": 368 }, "GOARCH": "arm64", "GOOS": "darwin", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.22.5", "GoplsVersion": "v0.16.1", "InitialWorkspaceLoadDuration": "2.040175s", "MemStats": { "HeapAlloc": 134564680, "HeapInUse": 189702144, "TotalAlloc": 1920963592 }, "WorkspaceStats": { "Files": { "Total": 9391, "Largest": 4241258, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.22.5", "AllPackages": { "Packages": 1576, "LargestPackage": 1722, "CompiledGoFiles": 9387, "Modules": 144 }, "WorkspacePackages": { "Packages": 16, "LargestPackage": 17, "CompiledGoFiles": 62, "Modules": 1 }, "Diagnostics": 0 } ] } }

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>

@gopherbot gopherbot added this to the Untriaged milestone Aug 16, 2024
@findleyr
Copy link
Member

This go/types bug was fixed in go 1.22.6 (golang/go#68334). Please install go 1.22.6 or go 1.23.0.

@findleyr findleyr closed this as not planned Won't fix, can't repro, duplicate, stale Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants