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

gopls: automated issue report (crash) #40464

Closed
ghost opened this issue Jul 29, 2020 · 2 comments
Closed

gopls: automated issue report (crash) #40464

ghost opened this issue Jul 29, 2020 · 2 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls.

Comments

@ghost
Copy link

ghost commented Jul 29, 2020

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

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

goroutine 64000 [running]:
go/types.(*Named).Obj(...)
	/usr/local/go/src/go/types/type.go:473
golang.org/x/tools/internal/lsp/source.pathLinkAndSymbolName(0xc0223f6a20, 0xc006c4a7d0, 0xc029e34840, 0xc034fbe4c0, 0x3c, 0xc025086301, 0x1)
	/usr/local/code/pkg/mod/golang.org/x/tools@v0.0.0-20200727221057-f479e347a516/internal/lsp/source/hover.go:169 +0xa7a
golang.org/x/tools/internal/lsp/source.HoverIdentifier(0x1ab1d20, 0xc02a95a300, 0xc0223f6a20, 0x0, 0x0, 0x0)
	/usr/local/code/pkg/mod/golang.org/x/tools@v0.0.0-20200727221057-f479e347a516/internal/lsp/source/hover.go:112 +0x261
golang.org/x/tools/internal/lsp/source.Hover(0x1ab1c60, 0xc024f186c0, 0x1ac53c0, 0xc0150f2c80, 0x1ab5aa0, 0xc0228b4780, 0x405a800000000000, 0x403d000000000000, 0x1ab5aa0, 0xc0228b4780, ...)
	/usr/local/code/pkg/mod/golang.org/x/tools@v0.0.0-20200727221057-f479e347a516/internal/lsp/source/hover.go:56 +0xde
golang.org/x/tools/internal/lsp.(*Server).hover(0xc0001dbf00, 0x1ab1c60, 0xc024f186c0, 0xc02a95a030, 0x0, 0x0, 0xc0063651e0)
	/usr/local/code/pkg/mod/golang.org/x/tools@v0.0.0-20200727221057-f479e347a516/internal/lsp/hover.go:24 +0x20b
golang.org/x/tools/internal/lsp.(*Server).Hover(0xc0001dbf00, 0x1ab1c60, 0xc024f186c0, 0xc02a95a030, 0xc02a95a030, 0x0, 0x0)
	/usr/local/code/pkg/mod/golang.org/x/tools@v0.0.0-20200727221057-f479e347a516/internal/lsp/server_gen.go:96 +0x49
golang.org/x/tools/internal/lsp/protocol.serverDispatch(0x1ab1c60, 0xc024f186c0, 0x1acc780, 0xc0001dbf00, 0xc02a95a000, 0x1ab1ea0, 0xc024f18640, 0x0, 0x0, 0x1a9f6e0)
	/usr/local/code/pkg/mod/golang.org/x/tools@v0.0.0-20200727221057-f479e347a516/internal/lsp/protocol/tsserver.go:269 +0x1315
golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1(0x1ab1c60, 0xc024f186c0, 0xc02a95a000, 0x1ab1ea0, 0xc024f18640, 0xbfc0563d768c9980, 0x1f56abde3a0)
	/usr/local/code/pkg/mod/golang.org/x/tools@v0.0.0-20200727221057-f479e347a516/internal/lsp/protocol/protocol.go:62 +0xc0
golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1(0x1ab1c60, 0xc024f186c0, 0xc02a95a000, 0x1ab1ea0, 0xc024f18640, 0x0, 0x0)
	/usr/local/code/pkg/mod/golang.org/x/tools@v0.0.0-20200727221057-f479e347a516/internal/lsp/lsprpc/lsprpc.go:521 +0x417
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1(0x1ab1c60, 0xc024f186c0, 0xc02a4114e0, 0x1ab1ea0, 0xc024f18640, 0xc0341847b0, 0x1990818)
	/usr/local/code/pkg/mod/golang.org/x/tools@v0.0.0-20200727221057-f479e347a516/internal/jsonrpc2/handler.go:35 +0xd3
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2(0xc0359a2060, 0xc0227ff530, 0xc0003bb3b0, 0x1ab1c60, 0xc024f186c0, 0xc02a4114e0, 0x1ab1ea0, 0xc024f18640)
	/usr/local/code/pkg/mod/golang.org/x/tools@v0.0.0-20200727221057-f479e347a516/internal/jsonrpc2/handler.go:103 +0x86
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1
	/usr/local/code/pkg/mod/golang.org/x/tools@v0.0.0-20200727221057-f479e347a516/internal/jsonrpc2/handler.go:100 +0x171
[Error - 10:39:50 AM] Connection to server got closed. Server will not be restarted.
[Error - 10:39:50 AM] Request textDocument/hover failed.
Error: Connection got disposed.
	at Object.dispose (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:14669:25)
	at Object.dispose (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:11304:35)
	at LanguageClient.handleConnectionClosed (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:13539:42)
	at LanguageClient.handleConnectionClosed (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:72212:15)
	at closeHandler (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:13526:18)
	at CallbackList.invoke (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:25598:39)
	at Emitter.fire (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:25657:36)
	at closeHandler (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:14005:26)
	at CallbackList.invoke (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:25598:39)
	at Emitter.fire (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:25657:36)
	at StreamMessageWriter.fireClose (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:30217:27)
	at Socket.<anonymous> (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:30236:46)
	at Socket.emit (events.js:203:13)
	at Pipe.<anonymous> (net.js:588:12)
[Error - 10:39:50 AM] Request textDocument/documentHighlight failed.
Error: Connection got disposed.
	at Object.dispose (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:14669:25)
	at Object.dispose (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:11304:35)
	at LanguageClient.handleConnectionClosed (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:13539:42)
	at LanguageClient.handleConnectionClosed (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:72212:15)
	at closeHandler (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:13526:18)
	at CallbackList.invoke (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:25598:39)
	at Emitter.fire (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:25657:36)
	at closeHandler (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:14005:26)
	at CallbackList.invoke (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:25598:39)
	at Emitter.fire (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:25657:36)
	at StreamMessageWriter.fireClose (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:30217:27)
	at Socket.<anonymous> (/Users/admin/.vscode/extensions/golang.go-nightly-2020.7.2419/dist/goMain.js:30236:46)
	at Socket.emit (events.js:203:13)
	at Pipe.<anonymous> (net.js:588:12)

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.

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 Jul 29, 2020
@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label Jul 29, 2020
@gopherbot
Copy link

Change https://golang.org/cl/245440 mentions this issue: internal/lsp/source: add extra nil check in searchForEnclosing

@gopherbot
Copy link

Change https://golang.org/cl/245457 mentions this issue: [gopls-release-branch.0.4] internal/lsp/source: add extra nil check in searchForEnclosing

gopherbot pushed a commit to golang/tools that referenced this issue Jul 29, 2020
…n searchForEnclosing

I still keep seeing this crash too, even after CL 244841.

Fixes golang/go#40464

Change-Id: Ic587045e65f34c24bd6df452e24517fd90e36bbe
Reviewed-on: https://go-review.googlesource.com/c/tools/+/245440
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
(cherry picked from commit df70183)
Reviewed-on: https://go-review.googlesource.com/c/tools/+/245457
@golang golang locked and limited conversation to collaborators Jul 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls.
Projects
None yet
Development

No branches or pull requests

1 participant