Skip to content

gopls: automated issue report (crash) #70246

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
WillXu0313 opened this issue Nov 4, 2024 · 3 comments
Closed

gopls: automated issue report (crash) #70246

WillXu0313 opened this issue Nov 4, 2024 · 3 comments
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.

Comments

@WillXu0313
Copy link

gopls version: v0.16.2/go1.22.5
gopls flags:
update flags: proxy
extension version: 0.42.1
environment: Visual Studio Code win32
initialization error: undefined
issue timestamp: Mon, 04 Nov 2024 13:36:08 GMT
restart history:
Mon, 04 Nov 2024 13:35:55 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

Please attach the stack trace from the crash.
A window with the error message should have popped up in the lower half of your screen.
Please copy the stack trace and error messages from that window and paste it in this issue.

Failed to auto-collect gopls trace: no gopls log.

gopls stats -anon { "DirStats": { "Files": 160, "TestdataFiles": 0, "GoFiles": 151, "ModFiles": 2, "Dirs": 14 }, "GOARCH": "amd64", "GOOS": "windows", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.22.5", "GoplsVersion": "v0.16.2", "InitialWorkspaceLoadDuration": "1.7283716s", "MemStats": { "HeapAlloc": 9840776, "HeapInUse": 17891328, "TotalAlloc": 231501952 }, "WorkspaceStats": { "Files": { "Total": 624, "Largest": 210104, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.22.5", "AllPackages": { "Packages": 57, "LargestPackage": 148, "CompiledGoFiles": 621, "Modules": 1 }, "WorkspacePackages": { "Packages": 3, "LargestPackage": 140, "CompiledGoFiles": 142, "Modules": 1 }, "Diagnostics": 54 } ] } }

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>

@WillXu0313
Copy link
Author

[Info - 21:38:40] 2024/11/04 21:38:40 Created View (#1)
directory=D:\许伟强的大学生活\自我学习汇总文件夹\LeetCode
view_type="GoMod"
root_dir="file:///D:/%E8%AE%B8%E4%BC%9F%E5%BC%BA%E7%9A%84%E5%A4%A7%E5%AD%A6%E7%94%9F%E6%B4%BB/%E8%87%AA%E6%88%91%E5%AD%A6%E4%B9%A0%E6%B1%87%E6%80%BB%E6%96%87%E4%BB%B6%E5%A4%B9/LeetCode"
go_version="go version go1.22.5 windows/amd64"
build_flags=[]
env={GOOS:windows GOARCH:amd64 GOCACHE:C:\Users\许伟强\AppData\Local\go-build GOMODCACHE:D:\GOPATH\pkg\mod GOPATH:D:\GOPATH GOPRIVATE: GOFLAGS: GO111MODULE:on GOTOOLCHAIN:auto GoVersion:22 GoVersionOutput:go version go1.22.5 windows/amd64
ExplicitGOWORK: EffectiveGOPACKAGESDRIVER:}
env_overlay=[]

[Info - 21:38:41] 2024/11/04 21:38:41 go/packages.Load golang/vscode-go#1
view_id="1"
snapshot=0
directory=D:\许伟强的大学生活\自我学习汇总文件夹\LeetCode
query=[D:\许伟强的大学生活\自我学习汇总文件夹\LeetCode... builtin]
packages=11
duration=992.6995ms

panic: D:/Go/src/go/types/stmt.go:932: assertion failed [recovered]
panic: D:/Go/src/go/types/stmt.go:932: assertion failed

goroutine 905 [running]:
go/types.(*Checker).handleBailout(0xc0000bca00, 0xc0019d9898)
D:/Go/src/go/types/check.go:367 +0x88
panic({0x148d9e0?, 0xc00145a5e0?})
D:/Go/src/runtime/panic.go:770 +0x132
go/types.assert(0x0?)
D:/Go/src/go/types/errors.go:28 +0x54
go/types.(*Checker).rangeStmt(0xc0000bca00, 0x3, 0xc001226fc0)
D:/Go/src/go/types/stmt.go:932 +0xe70
go/types.(*Checker).stmt(0xc0000bca00, 0x0, {0x1910640, 0xc001226fc0})
D:/Go/src/go/types/stmt.go:827 +0xab9
go/types.(*Checker).stmtList(0xc0000bca00, 0x0, {0xc0015b40c0?, 0xc000ac1880?, 0xc0019d8708?})
D:/Go/src/go/types/stmt.go:121 +0x85
go/types.(*Checker).funcBody(0xc0000bca00, 0x190ca30?, {0x163ef63?, 0x1fa6c80?}, 0xc000ac1900, 0xc0015aeea0, {0x0?, 0x0?})
D:/Go/src/go/types/stmt.go:41 +0x331
go/types.(*Checker).exprInternal.func1()
D:/Go/src/go/types/expr.go:1089 +0x3b
go/types.(*Checker).processDelayed(0xc0000bca00, 0x564)
D:/Go/src/go/types/check.go:467 +0x162
go/types.(*Checker).stmt(0xc0000bca00, 0x0, {0x1910460, 0xc0015b4100})
D:/Go/src/go/types/stmt.go:832 +0x264a
go/types.(*Checker).stmtList(0xc0000bca00, 0x0, {0xc001200900?, 0x0?, 0x162aa66?})
D:/Go/src/go/types/stmt.go:121 +0x85
go/types.(*Checker).funcBody(0xc0000bca00, 0x190db88?, {0xc00022f5e0?, 0xc001798440?}, 0xc000a99240, 0xc0015aeed0, {0x0?, 0x0?})
D:/Go/src/go/types/stmt.go:41 +0x331
go/types.(*Checker).funcDecl.func1()
D:/Go/src/go/types/decl.go:852 +0x3a
go/types.(*Checker).processDelayed(0xc0000bca00, 0x0)
D:/Go/src/go/types/check.go:467 +0x162
go/types.(*Checker).checkFiles(0xc0000bca00, {0xc001542908, 0x8c, 0x8f})
D:/Go/src/go/types/check.go:411 +0x1cc
go/types.(*Checker).Files(...)
D:/Go/src/go/types/check.go:372
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).checkPackage(0xc0012a2f60, {0x19118e8, 0xc00160f9b0}, 0xc000ea27e0)
D:/GOPATH/pkg/mod/golang.org/x/tools/[email protected]/internal/cache/check.go:1543 +0xa25
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).handleSyntaxPackage(0xc0012a2f60, {0x19118e8, 0xc00160f9b0}, 0x0, {0xc00032a408, 0x8})
D:/GOPATH/pkg/mod/golang.org/x/tools/[email protected]/internal/cache/check.go:568 +0x5e5
golang.org/x/tools/gopls/internal/cache.(*Snapshot).forEachPackageInternal.func2()
D:/GOPATH/pkg/mod/golang.org/x/tools/[email protected]/internal/cache/check.go:418 +0x2b
golang.org/x/sync/errgroup.(*Group).Go.func1()
D:/GOPATH/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 154
D:/GOPATH/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x96
[Info - 21:38:41]
true
[Info - 21:38:42] 2024/11/04 21:38:42 Created View (#1)
directory=D:\许伟强的大学生活\自我学习汇总文件夹\LeetCode
view_type="GoMod"
root_dir="file:///D:/%E8%AE%B8%E4%BC%9F%E5%BC%BA%E7%9A%84%E5%A4%A7%E5%AD%A6%E7%94%9F%E6%B4%BB/%E8%87%AA%E6%88%91%E5%AD%A6%E4%B9%A0%E6%B1%87%E6%80%BB%E6%96%87%E4%BB%B6%E5%A4%B9/LeetCode"
go_version="go version go1.22.5 windows/amd64"
build_flags=[]
env={GOOS:windows GOARCH:amd64 GOCACHE:C:\Users\许伟强\AppData\Local\go-build GOMODCACHE:D:\GOPATH\pkg\mod GOPATH:D:\GOPATH GOPRIVATE: GOFLAGS: GO111MODULE:on GOTOOLCHAIN:auto GoVersion:22 GoVersionOutput:go version go1.22.5 windows/amd64
ExplicitGOWORK: EffectiveGOPACKAGESDRIVER:}
env_overlay=[]

[Info - 21:38:42] 2024/11/04 21:38:42 go/packages.Load golang/vscode-go#1
view_id="1"
snapshot=0
directory=D:\许伟强的大学生活\自我学习汇总文件夹\LeetCode
query=[D:\许伟强的大学生活\自我学习汇总文件夹\LeetCode... builtin]
packages=11
duration=895.7263ms

panic: D:/Go/src/go/types/stmt.go:932: assertion failed [recovered]
panic: D:/Go/src/go/types/stmt.go:932: assertion failed

goroutine 863 [running]:
go/types.(*Checker).handleBailout(0xc000718400, 0xc001651898)
D:/Go/src/go/types/check.go:367 +0x88
panic({0x148d9e0?, 0xc001b9fd80?})
D:/Go/src/runtime/panic.go:770 +0x132
go/types.assert(0x0?)
D:/Go/src/go/types/errors.go:28 +0x54
go/types.(*Checker).rangeStmt(0xc000718400, 0x3, 0xc00064d080)
D:/Go/src/go/types/stmt.go:932 +0xe70
go/types.(*Checker).stmt(0xc000718400, 0x0, {0x1910640, 0xc00064d080})
D:/Go/src/go/types/stmt.go:827 +0xab9
go/types.(*Checker).stmtList(0xc000718400, 0x0, {0xc001203c40?, 0xc00137d7c0?, 0xc001650708?})
D:/Go/src/go/types/stmt.go:121 +0x85
go/types.(*Checker).funcBody(0xc000718400, 0x190ca30?, {0x163ef63?, 0x1fa6c80?}, 0xc00137d840, 0xc00120b650, {0x0?, 0x0?})
D:/Go/src/go/types/stmt.go:41 +0x331
go/types.(*Checker).exprInternal.func1()
D:/Go/src/go/types/expr.go:1089 +0x3b
go/types.(*Checker).processDelayed(0xc000718400, 0x564)
D:/Go/src/go/types/check.go:467 +0x162
go/types.(*Checker).stmt(0xc000718400, 0x0, {0x1910460, 0xc001203c80})
D:/Go/src/go/types/stmt.go:832 +0x264a
go/types.(*Checker).stmtList(0xc000718400, 0x0, {0xc000548700?, 0x0?, 0x162aa66?})
D:/Go/src/go/types/stmt.go:121 +0x85
go/types.(*Checker).funcBody(0xc000718400, 0x190db88?, {0xc0012100f0?, 0xc0016a9950?}, 0xc00056b280, 0xc00120b680, {0x0?, 0x0?})
D:/Go/src/go/types/stmt.go:41 +0x331
go/types.(*Checker).funcDecl.func1()
D:/Go/src/go/types/decl.go:852 +0x3a
go/types.(*Checker).processDelayed(0xc000718400, 0x0)
D:/Go/src/go/types/check.go:467 +0x162
go/types.(*Checker).checkFiles(0xc000718400, {0xc001804488, 0x8c, 0x8f})
D:/Go/src/go/types/check.go:411 +0x1cc
go/types.(*Checker).Files(...)
D:/Go/src/go/types/check.go:372
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).checkPackage(0xc0018fc5a0, {0x19118e8, 0xc001221a70}, 0xc0012ee900)
D:/GOPATH/pkg/mod/golang.org/x/tools/[email protected]/internal/cache/check.go:1543 +0xa25
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).handleSyntaxPackage(0xc0018fc5a0, {0x19118e8, 0xc001221a70}, 0x0, {0xc00015e268, 0x8})
D:/GOPATH/pkg/mod/golang.org/x/tools/[email protected]/internal/cache/check.go:568 +0x5e5
golang.org/x/tools/gopls/internal/cache.(*Snapshot).forEachPackageInternal.func2()
D:/GOPATH/pkg/mod/golang.org/x/tools/[email protected]/internal/cache/check.go:418 +0x2b
golang.org/x/sync/errgroup.(*Group).Go.func1()
D:/GOPATH/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 80
D:/GOPATH/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x96
[Info - 21:38:43]
true
[Info - 21:38:43] 2024/11/04 21:38:43 Created View (#1)
directory=D:\许伟强的大学生活\自我学习汇总文件夹\LeetCode
view_type="GoMod"
root_dir="file:///D:/%E8%AE%B8%E4%BC%9F%E5%BC%BA%E7%9A%84%E5%A4%A7%E5%AD%A6%E7%94%9F%E6%B4%BB/%E8%87%AA%E6%88%91%E5%AD%A6%E4%B9%A0%E6%B1%87%E6%80%BB%E6%96%87%E4%BB%B6%E5%A4%B9/LeetCode"
go_version="go version go1.22.5 windows/amd64"
build_flags=[]
env={GOOS:windows GOARCH:amd64 GOCACHE:C:\Users\许伟强\AppData\Local\go-build GOMODCACHE:D:\GOPATH\pkg\mod GOPATH:D:\GOPATH GOPRIVATE: GOFLAGS: GO111MODULE:on GOTOOLCHAIN:auto GoVersion:22 GoVersionOutput:go version go1.22.5 windows/amd64
ExplicitGOWORK: EffectiveGOPACKAGESDRIVER:}
env_overlay=[]

[Info - 21:38:44] 2024/11/04 21:38:44 go/packages.Load golang/vscode-go#1
view_id="1"
snapshot=0
directory=D:\许伟强的大学生活\自我学习汇总文件夹\LeetCode
query=[D:\许伟强的大学生活\自我学习汇总文件夹\LeetCode... builtin]
packages=11
duration=897.8298ms

panic: D:/Go/src/go/types/stmt.go:932: assertion failed [recovered]
panic: D:/Go/src/go/types/stmt.go:932: assertion failed

goroutine 1570 [running]:
go/types.(*Checker).handleBailout(0xc00159a400, 0xc0014ad898)
D:/Go/src/go/types/check.go:367 +0x88
panic({0x148d9e0?, 0xc0013891b0?})
D:/Go/src/runtime/panic.go:770 +0x132
go/types.assert(0x0?)
D:/Go/src/go/types/errors.go:28 +0x54
go/types.(*Checker).rangeStmt(0xc00159a400, 0x3, 0xc000c18c60)
D:/Go/src/go/types/stmt.go:932 +0xe70
go/types.(*Checker).stmt(0xc00159a400, 0x0, {0x1910640, 0xc000c18c60})
D:/Go/src/go/types/stmt.go:827 +0xab9
go/types.(*Checker).stmtList(0xc00159a400, 0x0, {0xc00122e340?, 0xc0017faf00?, 0xc0014ac708?})
D:/Go/src/go/types/stmt.go:121 +0x85
go/types.(*Checker).funcBody(0xc00159a400, 0x190ca30?, {0x163ef63?, 0x1fa6c80?}, 0xc0017faf80, 0xc001225cb0, {0x0?, 0x0?})
D:/Go/src/go/types/stmt.go:41 +0x331
go/types.(*Checker).exprInternal.func1()
D:/Go/src/go/types/expr.go:1089 +0x3b
go/types.(*Checker).processDelayed(0xc00159a400, 0x564)
D:/Go/src/go/types/check.go:467 +0x162
go/types.(*Checker).stmt(0xc00159a400, 0x0, {0x1910460, 0xc00122e380})
D:/Go/src/go/types/stmt.go:832 +0x264a
go/types.(*Checker).stmtList(0xc00159a400, 0x0, {0xc00120e580?, 0x0?, 0x162aa66?})
D:/Go/src/go/types/stmt.go:121 +0x85
go/types.(*Checker).funcBody(0xc00159a400, 0x190db88?, {0xc00122a270?, 0xc0019330c0?}, 0xc000f37840, 0xc001225ce0, {0x0?, 0x0?})
D:/Go/src/go/types/stmt.go:41 +0x331
go/types.(*Checker).funcDecl.func1()
D:/Go/src/go/types/decl.go:852 +0x3a
go/types.(*Checker).processDelayed(0xc00159a400, 0x0)
D:/Go/src/go/types/check.go:467 +0x162
go/types.(*Checker).checkFiles(0xc00159a400, {0xc000cd7208, 0x8c, 0x8f})
D:/Go/src/go/types/check.go:411 +0x1cc
go/types.(*Checker).Files(...)
D:/Go/src/go/types/check.go:372
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).checkPackage(0xc00079dc80, {0x19118e8, 0xc0019839e0}, 0xc001308ea0)
D:/GOPATH/pkg/mod/golang.org/x/tools/[email protected]/internal/cache/check.go:1543 +0xa25
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).handleSyntaxPackage(0xc00079dc80, {0x19118e8, 0xc0019839e0}, 0x0, {0xc00074d7c8, 0x8})
D:/GOPATH/pkg/mod/golang.org/x/tools/[email protected]/internal/cache/check.go:568 +0x5e5
golang.org/x/tools/gopls/internal/cache.(*Snapshot).forEachPackageInternal.func2()
D:/GOPATH/pkg/mod/golang.org/x/tools/[email protected]/internal/cache/check.go:418 +0x2b
golang.org/x/sync/errgroup.(*Group).Go.func1()
D:/GOPATH/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 914
D:/GOPATH/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x96
[Info - 21:38:44]
true
[Info - 21:38:44] 2024/11/04 21:38:44 Created View (#1)
directory=D:\许伟强的大学生活\自我学习汇总文件夹\LeetCode
view_type="GoMod"
root_dir="file:///D:/%E8%AE%B8%E4%BC%9F%E5%BC%BA%E7%9A%84%E5%A4%A7%E5%AD%A6%E7%94%9F%E6%B4%BB/%E8%87%AA%E6%88%91%E5%AD%A6%E4%B9%A0%E6%B1%87%E6%80%BB%E6%96%87%E4%BB%B6%E5%A4%B9/LeetCode"
go_version="go version go1.22.5 windows/amd64"
build_flags=[]
env={GOOS:windows GOARCH:amd64 GOCACHE:C:\Users\许伟强\AppData\Local\go-build GOMODCACHE:D:\GOPATH\pkg\mod GOPATH:D:\GOPATH GOPRIVATE: GOFLAGS: GO111MODULE:on GOTOOLCHAIN:auto GoVersion:22 GoVersionOutput:go version go1.22.5 windows/amd64
ExplicitGOWORK: EffectiveGOPACKAGESDRIVER:}
env_overlay=[]

[Info - 21:38:45] 2024/11/04 21:38:45 go/packages.Load golang/vscode-go#1
view_id="1"
snapshot=0
directory=D:\许伟强的大学生活\自我学习汇总文件夹\LeetCode
query=[D:\许伟强的大学生活\自我学习汇总文件夹\LeetCode... builtin]
packages=11
duration=887.7011ms

panic: D:/Go/src/go/types/stmt.go:932: assertion failed [recovered]
panic: D:/Go/src/go/types/stmt.go:932: assertion failed

goroutine 703 [running]:
go/types.(*Checker).handleBailout(0xc0002f0800, 0xc0013f7898)
D:/Go/src/go/types/check.go:367 +0x88
panic({0x148d9e0?, 0xc001c83b90?})
D:/Go/src/runtime/panic.go:770 +0x132
go/types.assert(0x0?)
D:/Go/src/go/types/errors.go:28 +0x54
go/types.(*Checker).rangeStmt(0xc0002f0800, 0x3, 0xc0004b0d80)
D:/Go/src/go/types/stmt.go:932 +0xe70
go/types.(*Checker).stmt(0xc0002f0800, 0x0, {0x1910640, 0xc0004b0d80})
D:/Go/src/go/types/stmt.go:827 +0xab9
go/types.(*Checker).stmtList(0xc0002f0800, 0x0, {0xc00023fc40?, 0xc0010d0e80?, 0xc0013f6708?})
D:/Go/src/go/types/stmt.go:121 +0x85
go/types.(*Checker).funcBody(0xc0002f0800, 0x190ca30?, {0x163ef63?, 0x1fa6c80?}, 0xc0010d0f00, 0xc0002e94a0, {0x0?, 0x0?})
D:/Go/src/go/types/stmt.go:41 +0x331
go/types.(*Checker).exprInternal.func1()
D:/Go/src/go/types/expr.go:1089 +0x3b
go/types.(*Checker).processDelayed(0xc0002f0800, 0x564)
D:/Go/src/go/types/check.go:467 +0x162
go/types.(*Checker).stmt(0xc0002f0800, 0x0, {0x1910460, 0xc00023fc80})
D:/Go/src/go/types/stmt.go:832 +0x264a
go/types.(*Checker).stmtList(0xc0002f0800, 0x0, {0xc000826480?, 0x0?, 0x162aa66?})
D:/Go/src/go/types/stmt.go:121 +0x85
go/types.(*Checker).funcBody(0xc0002f0800, 0x190db88?, {0xc0002e7a60?, 0xc001d02200?}, 0xc00119cf00, 0xc0002e94d0, {0x0?, 0x0?})
D:/Go/src/go/types/stmt.go:41 +0x331
go/types.(*Checker).funcDecl.func1()
D:/Go/src/go/types/decl.go:852 +0x3a
go/types.(*Checker).processDelayed(0xc0002f0800, 0x0)
D:/Go/src/go/types/check.go:467 +0x162
go/types.(*Checker).checkFiles(0xc0002f0800, {0xc001611688, 0x8c, 0x8f})
D:/Go/src/go/types/check.go:411 +0x1cc
go/types.(*Checker).Files(...)
D:/Go/src/go/types/check.go:372
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).checkPackage(0xc0017f5aa0, {0x19118e8, 0xc000e9e660}, 0xc00062efc0)
D:/GOPATH/pkg/mod/golang.org/x/tools/[email protected]/internal/cache/check.go:1543 +0xa25
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).handleSyntaxPackage(0xc0017f5aa0, {0x19118e8, 0xc000e9e660}, 0x0, {0xc00032c188, 0x8})
D:/GOPATH/pkg/mod/golang.org/x/tools/[email protected]/internal/cache/check.go:568 +0x5e5
golang.org/x/tools/gopls/internal/cache.(*Snapshot).forEachPackageInternal.func2()
D:/GOPATH/pkg/mod/golang.org/x/tools/[email protected]/internal/cache/check.go:418 +0x2b
golang.org/x/sync/errgroup.(*Group).Go.func1()
D:/GOPATH/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 146
D:/GOPATH/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x96
[Info - 21:38:45]
true
[Info - 21:38:46] 2024/11/04 21:38:46 Created View (#1)
directory=D:\许伟强的大学生活\自我学习汇总文件夹\LeetCode
view_type="GoMod"
root_dir="file:///D:/%E8%AE%B8%E4%BC%9F%E5%BC%BA%E7%9A%84%E5%A4%A7%E5%AD%A6%E7%94%9F%E6%B4%BB/%E8%87%AA%E6%88%91%E5%AD%A6%E4%B9%A0%E6%B1%87%E6%80%BB%E6%96%87%E4%BB%B6%E5%A4%B9/LeetCode"
go_version="go version go1.22.5 windows/amd64"
build_flags=[]
env={GOOS:windows GOARCH:amd64 GOCACHE:C:\Users\许伟强\AppData\Local\go-build GOMODCACHE:D:\GOPATH\pkg\mod GOPATH:D:\GOPATH GOPRIVATE: GOFLAGS: GO111MODULE:on GOTOOLCHAIN:auto GoVersion:22 GoVersionOutput:go version go1.22.5 windows/amd64
ExplicitGOWORK: EffectiveGOPACKAGESDRIVER:}
env_overlay=[]

[Info - 21:38:47] 2024/11/04 21:38:47 go/packages.Load golang/vscode-go#1
view_id="1"
snapshot=0
directory=D:\许伟强的大学生活\自我学习汇总文件夹\LeetCode
query=[D:\许伟强的大学生活\自我学习汇总文件夹\LeetCode... builtin]
packages=11
duration=1.0043577s

panic: D:/Go/src/go/types/stmt.go:932: assertion failed [recovered]
panic: D:/Go/src/go/types/stmt.go:932: assertion failed

goroutine 927 [running]:
go/types.(*Checker).handleBailout(0xc000ede200, 0xc00137d898)
D:/Go/src/go/types/check.go:367 +0x88
panic({0x148d9e0?, 0xc0012e17b0?})
D:/Go/src/runtime/panic.go:770 +0x132
go/types.assert(0x0?)
D:/Go/src/go/types/errors.go:28 +0x54
go/types.(*Checker).rangeStmt(0xc000ede200, 0x3, 0xc001498ae0)
D:/Go/src/go/types/stmt.go:932 +0xe70
go/types.(*Checker).stmt(0xc000ede200, 0x0, {0x1910640, 0xc001498ae0})
D:/Go/src/go/types/stmt.go:827 +0xab9
go/types.(*Checker).stmtList(0xc000ede200, 0x0, {0xc0014ae500?, 0xc000f46500?, 0xc00137c708?})
D:/Go/src/go/types/stmt.go:121 +0x85
go/types.(*Checker).funcBody(0xc000ede200, 0x190ca30?, {0x163ef63?, 0x1fa6c80?}, 0xc000f46580, 0xc0005301e0, {0x0?, 0x0?})
D:/Go/src/go/types/stmt.go:41 +0x331
go/types.(*Checker).exprInternal.func1()
D:/Go/src/go/types/expr.go:1089 +0x3b
go/types.(*Checker).processDelayed(0xc000ede200, 0x564)
D:/Go/src/go/types/check.go:467 +0x162
go/types.(*Checker).stmt(0xc000ede200, 0x0, {0x1910460, 0xc0014ae540})
D:/Go/src/go/types/stmt.go:832 +0x264a
go/types.(*Checker).stmtList(0xc000ede200, 0x0, {0xc000c7e480?, 0x0?, 0x162aa66?})
D:/Go/src/go/types/stmt.go:121 +0x85
go/types.(*Checker).funcBody(0xc000ede200, 0x190db88?, {0xc00038d2e0?, 0xc0012f96d0?}, 0xc000a50ec0, 0xc000530210, {0x0?, 0x0?})
D:/Go/src/go/types/stmt.go:41 +0x331
go/types.(*Checker).funcDecl.func1()
D:/Go/src/go/types/decl.go:852 +0x3a
go/types.(*Checker).processDelayed(0xc000ede200, 0x0)
D:/Go/src/go/types/check.go:467 +0x162
go/types.(*Checker).checkFiles(0xc000ede200, {0xc001420488, 0x8c, 0x8f})
D:/Go/src/go/types/check.go:411 +0x1cc
go/types.(*Checker).Files(...)
D:/Go/src/go/types/check.go:372
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).checkPackage(0xc0012e5e60, {0x19118e8, 0xc0005d0e10}, 0xc0012a0120)
D:/GOPATH/pkg/mod/golang.org/x/tools/[email protected]/internal/cache/check.go:1543 +0xa25
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).handleSyntaxPackage(0xc0012e5e60, {0x19118e8, 0xc0005d0e10}, 0x0, {0xc0000bc0e8, 0x8})
D:/GOPATH/pkg/mod/golang.org/x/tools/[email protected]/internal/cache/check.go:568 +0x5e5
golang.org/x/tools/gopls/internal/cache.(*Snapshot).forEachPackageInternal.func2()
D:/GOPATH/pkg/mod/golang.org/x/tools/[email protected]/internal/cache/check.go:418 +0x2b
golang.org/x/sync/errgroup.(*Group).Go.func1()
D:/GOPATH/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 136
D:/GOPATH/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x96
[Error - 21:38:47]

@ansaba ansaba transferred this issue from golang/vscode-go Nov 7, 2024
@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label Nov 7, 2024
@ansaba ansaba added the Tools This label describes issues relating to any tools in the x/tools repository. label Nov 7, 2024
@findleyr
Copy link
Member

Duplicate of #68334. Please upgrade to Go 1.22.6 or later.

@findleyr findleyr closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2024
@WillXu0313
Copy link
Author

WillXu0313 commented Nov 21, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants