Skip to content
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

x/tools/gopls: automated issue report (crash) #40819

Closed
JinchiXie opened this issue Aug 16, 2020 · 2 comments
Closed

x/tools/gopls: automated issue report (crash) #40819

JinchiXie opened this issue Aug 16, 2020 · 2 comments
Labels
Milestone

Comments

@JinchiXie
Copy link

@JinchiXie JinchiXie commented Aug 16, 2020

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 from that window and paste it in this issue.

OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.

[Info  - 11:34:02 AM] 2020/08/16 11:34:02 Build info
----------
golang.org/x/tools/gopls 0.4.4
    golang.org/x/tools/gopls@v0.4.4 h1:8djGYsaZ0ByP0vaXg4T+mnyfDcHpWKSZ+tpQSGv9ahk=
    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/google/go-cmp@v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/mod@v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
    golang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
    golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c h1:jLQLIAedRoS9I2Py7l/ZAGGzUxLFsdg42JXEpS/a+ow=
    golang.org/x/xerrors@v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
    honnef.co/go/tools@v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=
    mvdan.cc/gofumpt@v0.0.0-20200709182408-4fd085cb6d5f h1:gi7cb8HTDZ6q8VqsUpkdoFi3vxwHMneQ6+Q5Ap5hjPE=
    mvdan.cc/xurls/v2@v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=

Go info
-------
go version go1.12.13 darwin/amd64



panic: runtime error: slice bounds out of range

goroutine 99 [running]:
golang.org/x/tools/internal/lsp/cache.sumFilename(0x0, 0x0, 0x0, 0xc000422000)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/cache/mod.go:131 +0x110
golang.org/x/tools/internal/lsp/cache.(*snapshot).ParseModHandle(0xc0001f2180, 0x1ad23e0, 0xc0003d4090, 0x1ad62a0, 0xc0001f4000, 0x0, 0x0, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/cache/mod.go:103 +0x2c5
golang.org/x/tools/internal/lsp/cache.(*View).WorkspaceDirectories(0xc000464000, 0x1ad23e0, 0xc0003d4090, 0x1, 0x1, 0x4, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/cache/view.go:564 +0x27b
golang.org/x/tools/internal/lsp.(*Server).initialized(0xc0001d7e00, 0x1ad23e0, 0xc0003d4090, 0x20b2b50, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/general.go:164 +0x51d
golang.org/x/tools/internal/lsp.(*Server).Initialized(0xc0001d7e00, 0x1ad23e0, 0xc0003d4090, 0x20b2b50, 0x20b2b50, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/server_gen.go:112 +0x49
golang.org/x/tools/internal/lsp/protocol.serverDispatch(0x1ad23e0, 0xc0003d4090, 0x1af0de0, 0xc0001d7e00, 0xc0000bfe90, 0x261a1b0, 0xc0003d4030, 0x0, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/protocol/tsserver.go:92 +0xac5
golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1(0x1ad23e0, 0xc0003d4090, 0xc0000bfe90, 0x261a1b0, 0xc0003d4030, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/protocol/protocol.go:62 +0xc0
golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1(0x1ad23e0, 0xc0003d4090, 0xc0000bfe90, 0x261a1b0, 0xc0003d4030, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/lsprpc/lsprpc.go:521 +0x445
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1(0x1ad23e0, 0xc0003d4090, 0xc00036a600, 0x261a1b0, 0xc0003d4030, 0x100774f, 0xc0000409b8)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/jsonrpc2/handler.go:35 +0xd9
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2(0xc0000ec660, 0xc0003d44b0, 0xc0001c1f60, 0x1ad23e0, 0xc0003d4090, 0xc00036a600, 0x261a1b0, 0xc0003d4030)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/jsonrpc2/handler.go:103 +0x86
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/jsonrpc2/handler.go:100 +0x174
[Info  - 11:34:02 AM] 2020/08/16 11:34:02 go env for /Users/jinchi.xie/Desktop/personal/fpe/webpa
(root /Users/jinchi.xie/Desktop/personal/fpe/webpa)
(valid build configuration = true)
(build flags: [])
GOPROXY=
GOROOT=/usr/local/go
GOMOD=/Users/jinchi.xie/Desktop/personal/fpe/webpa/go.mod
GOMODCACHE=
GOFLAGS=
GONOPROXY=
GONOSUMDB=
GO111MODULE=on
GOPRIVATE=
GOSUMDB=
GOINSECURE=
GOCACHE=/Users/jinchi.xie/Library/Caches/go-build
GOPATH=/Users/jinchi.xie/go


[Info  - 11:34:02 AM] Connection to server got closed. Server will restart.
[Info  - 11:34:02 AM] 2020/08/16 11:34:02 Build info
----------
golang.org/x/tools/gopls 0.4.4
    golang.org/x/tools/gopls@v0.4.4 h1:8djGYsaZ0ByP0vaXg4T+mnyfDcHpWKSZ+tpQSGv9ahk=
    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/google/go-cmp@v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/mod@v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
    golang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
    golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c h1:jLQLIAedRoS9I2Py7l/ZAGGzUxLFsdg42JXEpS/a+ow=
    golang.org/x/xerrors@v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
    honnef.co/go/tools@v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=
    mvdan.cc/gofumpt@v0.0.0-20200709182408-4fd085cb6d5f h1:gi7cb8HTDZ6q8VqsUpkdoFi3vxwHMneQ6+Q5Ap5hjPE=
    mvdan.cc/xurls/v2@v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=

Go info
-------
go version go1.12.13 darwin/amd64



panic: runtime error: slice bounds out of range

goroutine 40 [running]:
golang.org/x/tools/internal/lsp/cache.sumFilename(0x0, 0x0, 0x0, 0xc0000d4a20)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/cache/mod.go:131 +0x110
golang.org/x/tools/internal/lsp/cache.(*snapshot).ParseModHandle(0xc0001d1380, 0x1ad23e0, 0xc0001da4b0, 0x1ad62a0, 0xc0000e8780, 0x0, 0x0, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/cache/mod.go:103 +0x2c5
golang.org/x/tools/internal/lsp/cache.(*View).WorkspaceDirectories(0xc000386300, 0x1ad23e0, 0xc0001da4b0, 0x1, 0x1, 0x4, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/cache/view.go:564 +0x27b
golang.org/x/tools/internal/lsp.(*Server).initialized(0xc0001d0f80, 0x1ad23e0, 0xc0001da4b0, 0x20b2b50, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/general.go:164 +0x51d
golang.org/x/tools/internal/lsp.(*Server).Initialized(0xc0001d0f80, 0x1ad23e0, 0xc0001da4b0, 0x20b2b50, 0x20b2b50, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/server_gen.go:112 +0x49
golang.org/x/tools/internal/lsp/protocol.serverDispatch(0x1ad23e0, 0xc0001da4b0, 0x1af0de0, 0xc0001d0f80, 0xc0003be8d0, 0x5a91008, 0xc0001da450, 0x0, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/protocol/tsserver.go:92 +0xac5
golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1(0x1ad23e0, 0xc0001da4b0, 0xc0003be8d0, 0x5a91008, 0xc0001da450, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/protocol/protocol.go:62 +0xc0
golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1(0x1ad23e0, 0xc0001da4b0, 0xc0003be8d0, 0x5a91008, 0xc0001da450, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/lsprpc/lsprpc.go:521 +0x445
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1(0x1ad23e0, 0xc0001da4b0, 0xc0001bd2e0, 0x5a91008, 0xc0001da450, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/jsonrpc2/handler.go:35 +0xd9
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2(0xc0001ee840, 0xc0001da8d0, 0xc0000d7ca0, 0x1ad23e0, 0xc0001da4b0, 0xc0001bd2e0, 0x5a91008, 0xc0001da450)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/jsonrpc2/handler.go:103 +0x86
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/jsonrpc2/handler.go:100 +0x174
[Info  - 11:34:02 AM] Connection to server got closed. Server will restart.
[Info  - 11:34:02 AM] 2020/08/16 11:34:02 Build info
----------
golang.org/x/tools/gopls 0.4.4
    golang.org/x/tools/gopls@v0.4.4 h1:8djGYsaZ0ByP0vaXg4T+mnyfDcHpWKSZ+tpQSGv9ahk=
    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/google/go-cmp@v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/mod@v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
    golang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
    golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c h1:jLQLIAedRoS9I2Py7l/ZAGGzUxLFsdg42JXEpS/a+ow=
    golang.org/x/xerrors@v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
    honnef.co/go/tools@v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=
    mvdan.cc/gofumpt@v0.0.0-20200709182408-4fd085cb6d5f h1:gi7cb8HTDZ6q8VqsUpkdoFi3vxwHMneQ6+Q5Ap5hjPE=
    mvdan.cc/xurls/v2@v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=

Go info
-------
go version go1.12.13 darwin/amd64



[Info  - 11:34:02 AM] 2020/08/16 11:34:02 go env for /Users/jinchi.xie/Desktop/personal/fpe/webpa
(root /Users/jinchi.xie/Desktop/personal/fpe/webpa)
(valid build configuration = true)
(build flags: [])
GOINSECURE=
GOMODCACHE=
GOCACHE=/Users/jinchi.xie/Library/Caches/go-build
GOFLAGS=
GOSUMDB=
GO111MODULE=on
GOPATH=/Users/jinchi.xie/go
GOMOD=/Users/jinchi.xie/Desktop/personal/fpe/webpa/go.mod
GONOPROXY=
GONOSUMDB=
GOPROXY=
GOROOT=/usr/local/go
GOPRIVATE=


panic: runtime error: slice bounds out of range

goroutine 58 [running]:
golang.org/x/tools/internal/lsp/cache.sumFilename(0x0, 0x0, 0x0, 0xc0001ae260)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/cache/mod.go:131 +0x110
golang.org/x/tools/internal/lsp/cache.(*snapshot).ParseModHandle(0xc00011ba00, 0x1ad23e0, 0xc0003a3710, 0x1ad62a0, 0xc0001ba0a0, 0x0, 0x0, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/cache/mod.go:103 +0x2c5
golang.org/x/tools/internal/lsp/cache.(*View).WorkspaceDirectories(0xc000134f00, 0x1ad23e0, 0xc0003a3710, 0x1, 0x1, 0x4, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/cache/view.go:564 +0x27b
golang.org/x/tools/internal/lsp.(*Server).initialized(0xc000340280, 0x1ad23e0, 0xc0003a3710, 0x20b2b50, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/general.go:164 +0x51d
golang.org/x/tools/internal/lsp.(*Server).Initialized(0xc000340280, 0x1ad23e0, 0xc0003a3710, 0x20b2b50, 0x20b2b50, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/server_gen.go:112 +0x49
golang.org/x/tools/internal/lsp/protocol.serverDispatch(0x1ad23e0, 0xc0003a3710, 0x1af0de0, 0xc000340280, 0xc0004121b0, 0x271d410, 0xc0003a36b0, 0x0, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/protocol/tsserver.go:92 +0xac5
golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1(0x1ad23e0, 0xc0003a3710, 0xc0004121b0, 0x271d410, 0xc0003a36b0, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/protocol/protocol.go:62 +0xc0
golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1(0x1ad23e0, 0xc0003a3710, 0xc0004121b0, 0x271d410, 0xc0003a36b0, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/lsprpc/lsprpc.go:521 +0x445
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1(0x1ad23e0, 0xc0003a3710, 0xc0003fe6e0, 0x271d410, 0xc0003a36b0, 0x1, 0x12f4657)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/jsonrpc2/handler.go:35 +0xd9
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2(0xc00034e420, 0xc0003a3b30, 0xc000322440, 0x1ad23e0, 0xc0003a3710, 0xc0003fe6e0, 0x271d410, 0xc0003a36b0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/jsonrpc2/handler.go:103 +0x86
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/jsonrpc2/handler.go:100 +0x174
[Info  - 11:34:02 AM] Connection to server got closed. Server will restart.
[Info  - 11:34:03 AM] 2020/08/16 11:34:03 Build info
----------
golang.org/x/tools/gopls 0.4.4
    golang.org/x/tools/gopls@v0.4.4 h1:8djGYsaZ0ByP0vaXg4T+mnyfDcHpWKSZ+tpQSGv9ahk=
    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/google/go-cmp@v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/mod@v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
    golang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
    golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c h1:jLQLIAedRoS9I2Py7l/ZAGGzUxLFsdg42JXEpS/a+ow=
    golang.org/x/xerrors@v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
    honnef.co/go/tools@v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=
    mvdan.cc/gofumpt@v0.0.0-20200709182408-4fd085cb6d5f h1:gi7cb8HTDZ6q8VqsUpkdoFi3vxwHMneQ6+Q5Ap5hjPE=
    mvdan.cc/xurls/v2@v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=

Go info
-------
go version go1.12.13 darwin/amd64



[Info  - 11:34:03 AM] 2020/08/16 11:34:03 go env for /Users/jinchi.xie/Desktop/personal/fpe/webpa
(root /Users/jinchi.xie/Desktop/personal/fpe/webpa)
(valid build configuration = true)
(build flags: [])
GONOSUMDB=
GOROOT=/usr/local/go
GOFLAGS=
GOPRIVATE=
GOPROXY=
GONOPROXY=
GOSUMDB=
GO111MODULE=on
GOCACHE=/Users/jinchi.xie/Library/Caches/go-build
GOINSECURE=
GOPATH=/Users/jinchi.xie/go
GOMOD=/Users/jinchi.xie/Desktop/personal/fpe/webpa/go.mod
GOMODCACHE=


[Info  - 11:34:03 AM] Connection to server got closed. Server will restart.
panic: runtime error: slice bounds out of range

goroutine 15 [running]:
golang.org/x/tools/internal/lsp/cache.sumFilename(0x0, 0x0, 0x0, 0xc0003dc0a0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/cache/mod.go:131 +0x110
golang.org/x/tools/internal/lsp/cache.(*snapshot).ParseModHandle(0xc0003b6180, 0x1ad23e0, 0xc0003fc420, 0x1ad62a0, 0xc000248730, 0x0, 0x0, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/cache/mod.go:103 +0x2c5
golang.org/x/tools/internal/lsp/cache.(*View).WorkspaceDirectories(0xc0003a8300, 0x1ad23e0, 0xc0003fc420, 0x1, 0x1, 0x4, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/cache/view.go:564 +0x27b
golang.org/x/tools/internal/lsp.(*Server).initialized(0xc000303d80, 0x1ad23e0, 0xc0003fc420, 0x20b2b50, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/general.go:164 +0x51d
golang.org/x/tools/internal/lsp.(*Server).Initialized(0xc000303d80, 0x1ad23e0, 0xc0003fc420, 0x20b2b50, 0x20b2b50, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/server_gen.go:112 +0x49
golang.org/x/tools/internal/lsp/protocol.serverDispatch(0x1ad23e0, 0xc0003fc420, 0x1af0de0, 0xc000303d80, 0xc000353830, 0x2293360, 0xc0003fc3c0, 0x0, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/protocol/tsserver.go:92 +0xac5
golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1(0x1ad23e0, 0xc0003fc420, 0xc000353830, 0x2293360, 0xc0003fc3c0, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/protocol/protocol.go:62 +0xc0
golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1(0x1ad23e0, 0xc0003fc420, 0xc000353830, 0x2293360, 0xc0003fc3c0, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/lsprpc/lsprpc.go:521 +0x445
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1(0x1ad23e0, 0xc0003fc420, 0xc0003dd720, 0x2293360, 0xc0003fc3c0, 0x1, 0x12f4657)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/jsonrpc2/handler.go:35 +0xd9
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2(0xc0000aad20, 0xc0003fc840, 0xc00007f4c0, 0x1ad23e0, 0xc0003fc420, 0xc0003dd720, 0x2293360, 0xc0003fc3c0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/jsonrpc2/handler.go:103 +0x86
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/jsonrpc2/handler.go:100 +0x174
[Info  - 11:34:03 AM] 2020/08/16 11:34:03 Build info
----------
golang.org/x/tools/gopls 0.4.4
    golang.org/x/tools/gopls@v0.4.4 h1:8djGYsaZ0ByP0vaXg4T+mnyfDcHpWKSZ+tpQSGv9ahk=
    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/google/go-cmp@v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/mod@v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
    golang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
    golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c h1:jLQLIAedRoS9I2Py7l/ZAGGzUxLFsdg42JXEpS/a+ow=
    golang.org/x/xerrors@v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
    honnef.co/go/tools@v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=
    mvdan.cc/gofumpt@v0.0.0-20200709182408-4fd085cb6d5f h1:gi7cb8HTDZ6q8VqsUpkdoFi3vxwHMneQ6+Q5Ap5hjPE=
    mvdan.cc/xurls/v2@v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=

Go info
-------
go version go1.12.13 darwin/amd64



[Info  - 11:34:03 AM] 2020/08/16 11:34:03 go env for /Users/jinchi.xie/Desktop/personal/fpe/webpa
(root /Users/jinchi.xie/Desktop/personal/fpe/webpa)
(valid build configuration = true)
(build flags: [])
GOMOD=/Users/jinchi.xie/Desktop/personal/fpe/webpa/go.mod
GONOPROXY=
GOMODCACHE=
GOPATH=/Users/jinchi.xie/go
GOSUMDB=
GOFLAGS=
GOINSECURE=
GONOSUMDB=
GO111MODULE=on
GOPRIVATE=
GOPROXY=
GOROOT=/usr/local/go
GOCACHE=/Users/jinchi.xie/Library/Caches/go-build


panic: runtime error: slice bounds out of range

goroutine 115 [running]:
golang.org/x/tools/internal/lsp/cache.sumFilename(0x0, 0x0, 0x0, 0xc0001bbba0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/cache/mod.go:131 +0x110
golang.org/x/tools/internal/lsp/cache.(*snapshot).ParseModHandle(0xc0001a1100, 0x1ad23e0, 0xc0003a1bc0, 0x1ad62a0, 0xc000272000, 0x0, 0x0, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/cache/mod.go:103 +0x2c5
golang.org/x/tools/internal/lsp/cache.(*View).WorkspaceDirectories(0xc000458000, 0x1ad23e0, 0xc0003a1bc0, 0x1, 0x1, 0x4, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/cache/view.go:564 +0x27b
golang.org/x/tools/internal/lsp.(*Server).initialized(0xc000331200, 0x1ad23e0, 0xc0003a1bc0, 0x20b2b50, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/general.go:164 +0x51d
golang.org/x/tools/internal/lsp.(*Server).Initialized(0xc000331200, 0x1ad23e0, 0xc0003a1bc0, 0x20b2b50, 0x20b2b50, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/server_gen.go:112 +0x49
golang.org/x/tools/internal/lsp/protocol.serverDispatch(0x1ad23e0, 0xc0003a1bc0, 0x1af0de0, 0xc000331200, 0xc00037e2d0, 0x5a91360, 0xc0003a1b60, 0x0, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/protocol/tsserver.go:92 +0xac5
golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1(0x1ad23e0, 0xc0003a1bc0, 0xc00037e2d0, 0x5a91360, 0xc0003a1b60, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/protocol/protocol.go:62 +0xc0
golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1(0x1ad23e0, 0xc0003a1bc0, 0xc00037e2d0, 0x5a91360, 0xc0003a1b60, 0x0, 0x0)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/lsp/lsprpc/lsprpc.go:521 +0x445
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1(0x1ad23e0, 0xc0003a1bc0, 0xc0003e9aa0, 0x5a91360, 0xc0003a1b60, 0x1, 0x12f4657)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/jsonrpc2/handler.go:35 +0xd9
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2(0xc000040780, 0xc0003c6000, 0xc0001bd2e0, 0x1ad23e0, 0xc0003a1bc0, 0xc0003e9aa0, 0x5a91360, 0xc0003a1b60)
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/jsonrpc2/handler.go:103 +0x86
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1
	/Users/jinchi.xie/go/pkg/mod/golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c/internal/jsonrpc2/handler.go:100 +0x174
[Error - 11:34:03 AM] Connection to server got closed. Server will not be restarted.

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>

@stamblerre stamblerre transferred this issue from golang/vscode-go Aug 16, 2020
@gopherbot gopherbot added the gopls label Aug 16, 2020
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Aug 16, 2020

Thanks for the report! I believe this issue should be resolved at master. Can you try installing the current master and see if that works for you? You can do so by running GO111MODULE=on go get golang.org/x/tools/gopls@master golang.org/x/tools@master.

@stamblerre stamblerre changed the title gopls: automated issue report (crash) x/tools/gopls: automated issue report (crash) Aug 16, 2020
@gopherbot gopherbot added the Tools label Aug 16, 2020
@gopherbot gopherbot added this to the Unreleased milestone Aug 16, 2020
@stamblerre stamblerre modified the milestones: Unreleased, gopls/v.0.5.0 Aug 16, 2020
@JinchiXie
Copy link
Author

@JinchiXie JinchiXie commented Aug 16, 2020

Thanks for the report! I believe this issue should be resolved at master. Can you try installing the current master and see if that works for you? You can do so by running GO111MODULE=on go get golang.org/x/tools/gopls@master golang.org/x/tools@master.

thx. The problem is solved when I open the folder which contains go.mod file instead of its parent folder.

@JinchiXie JinchiXie closed this Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.