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/cmd/gopls: crash when file in temporary directory gets focus in editor #32393

Closed
adiabatic opened this issue Jun 2, 2019 · 2 comments
Closed

Comments

@adiabatic
Copy link

@adiabatic adiabatic commented Jun 2, 2019

What version of Go are you using (go version)?

$ go version
go version go1.12.5 darwin/amd64

Does this issue reproduce with the latest release?

Yes. 1.12.5 is the latest on golang.org/dl/.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
> go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/comatoast/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/comatoast/Projects/Go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/comatoast/Projects/quote-educator/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/wy/3sprnnbj2yx9h60jbs4qjvpr0000gn/T/go-build542294161=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

In Visual Studio Code, in ~/Projects/quote-educator/, I'm editing a main.go and main_test.go that are both in Git. I also pulled older versions of those files, through Tower, into automatically-generated temporary directories so I could manually copy previously-deleted code from the old version to the new version. Currently, the old version of main.go is at /private/var/folders/wy/3sprnnbj2yx9h60jbs4qjvpr0000gn/T/697EBAFD-4D0F-4B8A-8E4E-64A40051CE0B/main.go and the old version of main_test.go is at /private/var/folders/wy/3sprnnbj2yx9h60jbs4qjvpr0000gn/T/460EE07C-B5FC-4695-B9CE-17E9BC14020A/main_test.go.

I got the "The gopls server crashed 5 times in the last 3 minutes. The server will not be restarted." error and thought it was due to a fluke, so I restarted Visual Studio Code. Everything seemed fine until I clicked in the windowpane (buffer?) containing one of the old files. Shortly thereafter, I got the "The gopls server crashed 5 times in the last 3 minutes. The server will not be restarted." error message again.

Attached is the log of the latest crash that happened a couple minutes ago.

gopls-dies-with-files-in-weird-places.txt

@gopherbot gopherbot added this to the Unreleased milestone Jun 2, 2019
@gopherbot gopherbot added the gopls label Jun 2, 2019
@ianthehat
Copy link

@ianthehat ianthehat commented Jun 3, 2019

From the log this looks like a duplicate of #32120 which was fixed 13 days ago, can you try updating gopls and seeing if it still happens?

@stamblerre stamblerre changed the title x/tools/cmd/gopls: Crash when file in temporary directory gets focus in editor x/tools/cmd/gopls: crash when file in temporary directory gets focus in editor Jun 3, 2019
@adiabatic
Copy link
Author

@adiabatic adiabatic commented Jun 4, 2019

can you try updating gopls and seeing if it still happens?

That fixed the crashing. Thanks a bunch for digging up #32120; I'll update my tools and try things again before reporting bugs in the future.

@adiabatic adiabatic closed this Jun 4, 2019
@golang golang locked and limited conversation to collaborators Jun 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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