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

muirdm opened this issue Oct 25, 2019 · 2 comments

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

muirdm opened this issue Oct 25, 2019 · 2 comments


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

Copy link

@gopherbot gopherbot commented Nov 1, 2019

Change mentions this issue: internal/lsp: fix nil pointer in textDocument/didClose

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

Successfully merging a pull request may close this issue.

None yet
2 participants