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: panic closing overlay file #35165

Closed
muirdm opened this issue Oct 25, 2019 · 2 comments
Closed

x/tools/gopls: panic closing overlay file #35165

muirdm opened this issue Oct 25, 2019 · 2 comments
Labels
Milestone

Comments

@muirdm
Copy link

@muirdm muirdm commented Oct 25, 2019

I saw this panic when creating an overlay package, and then closing the buffer without ever having saved the file:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1699ce7]

goroutine 32949 [running]:
golang.org/x/tools/internal/lsp/cache.(*snapshot).CheckPackageHandles(0xc016582370, 0x19a5c40, 0xc01b3a6b40, 0x0, 0x0, 0x1e833a0, 0x18621d3, 0x7, 0x1995240, 0xc023ef6990)
	/Users/muir/projects/tools/internal/lsp/cache/gofile.go:31 +0x37
golang.org/x/tools/internal/lsp/cache.(*view).CheckPackageHandles(0xc000316480, 0x19a5c40, 0xc01b3a6b40, 0x0, 0x0, 0xc023ef6990, 0xc006155ad0, 0x1, 0x1, 0x0, ...)
	/Users/muir/projects/tools/internal/lsp/cache/gofile.go:20 +0x76
golang.org/x/tools/internal/lsp.(*Server).didClose(0xc000259b00, 0x19a5b80, 0xc02389d2c0, 0xc00dd3bab0, 0x0, 0x0)
	/Users/muir/projects/tools/internal/lsp/text_synchronization.go:159 +0x382
golang.org/x/tools/internal/lsp.(*Server).DidClose(0xc000259b00, 0x19a5b80, 0xc02389d2c0, 0xc00dd3bab0, 0xc00dd3bab0, 0x0)
	/Users/muir/projects/tools/internal/lsp/server.go:155 +0x49
golang.org/x/tools/internal/lsp/protocol.serverHandler.Deliver(0x19bbe80, 0xc000259b00, 0x19a5b80, 0xc02389d2c0, 0xc02389d300, 0x1007000, 0xc00a0f0001)
	/Users/muir/projects/tools/internal/lsp/protocol/tsserver.go:131 +0x15e1
golang.org/x/tools/internal/jsonrpc2.(*Conn).Run.func1(0xc019660660, 0xc02389d300, 0xc000259b60, 0x19a5b80, 0xc02389d2c0, 0x0, 0x0, 0xc028f7f350)
	/Users/muir/projects/tools/internal/jsonrpc2/jsonrpc2.go:370 +0x170
created by golang.org/x/tools/internal/jsonrpc2.(*Conn).Run
	/Users/muir/projects/tools/internal/jsonrpc2/jsonrpc2.go:354 +0x877
@gopherbot gopherbot added this to the Unreleased milestone Oct 25, 2019
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Oct 25, 2019

Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 1, 2019

Change https://golang.org/cl/204823 mentions this issue: internal/lsp: fix nil pointer in textDocument/didClose

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
2 participants
You can’t perform that action at this time.