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 in MethodSets: nil data for package #59138

Closed
findleyr opened this issue Mar 19, 2023 · 3 comments
Closed

x/tools/gopls: panic in MethodSets: nil data for package #59138

findleyr opened this issue Mar 19, 2023 · 3 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@findleyr
Copy link
Contributor

Just encountered this panic while using gopls@master:

panic: nil data for golang.org/x/tools/internal/gopathwalk [golang.org/x/tools/internal/gopathwalk.test]

goroutine 4697562 [running]:
golang.org/x/tools/gopls/internal/lsp/cache.(*snapshot).MethodSets(0xc016d36dc0?, {0x10f1328?, 0xc019dde270?}, {0xc0058f1000, 0x2da, 0x0?})
        /home/rfindley/src/tools2/gopls/internal/lsp/cache/snapshot.go:688 +0x2f4
golang.org/x/tools/gopls/internal/lsp/source.expandMethodSearch({0x10f1328?, 0xc019dde270}, {0x10fe550?, 0xc016d36dc0}, 0xc01b62f5c0, {0x10ed678?, 0xc03cb72410}, 0xc019dde450, 0xc019dde4b0)
        /home/rfindley/src/tools2/gopls/internal/lsp/source/references.go:392 +0x45a
golang.org/x/tools/gopls/internal/lsp/source.ordinaryReferences({0x10f1328?, 0xc019dde270}, {0x10fe550?, 0xc016d36dc0}, {0xc011ac8780?, 0xc0155bb740?}, {0x10?, 0x0?})
        /home/rfindley/src/tools2/gopls/internal/lsp/source/references.go:295 +0x74c
golang.org/x/tools/gopls/internal/lsp/source.references({0x10f12b8?, 0xc017e01540?}, {0x10fe550, 0xc016d36dc0}, {0x10f2180?, 0xc0155bb740?}, {0xa648f00?, 0xc0?}, 0x1)
        /home/rfindley/src/tools2/gopls/internal/lsp/source/references.go:76 +0x1ce
golang.org/x/tools/gopls/internal/lsp/source.References({0x10f12b8?, 0xc017e01540?}, {0x10fe550?, 0xc016d36dc0?}, {0x10f2180?, 0xc0155bb740?}, {0xcfe1c0?, 0x0?}, 0x40?)
        /home/rfindley/src/tools2/gopls/internal/lsp/source/references.go:40 +0x4f
golang.org/x/tools/gopls/internal/lsp.(*Server).references(0xcfe1c0?, {0x10f12b8, 0xc017e01540}, 0xc0189b2740)
        /home/rfindley/src/tools2/gopls/internal/lsp/references.go:24 +0x192
golang.org/x/tools/gopls/internal/lsp.(*Server).References(0xc0112fa160?, {0x10f12b8?, 0xc017e01540?}, 0xcfe1c0?)
        /home/rfindley/src/tools2/gopls/internal/lsp/server_gen.go:204 +0x1d
golang.org/x/tools/gopls/internal/lsp/protocol.serverDispatch({0x10f12b8, 0xc017e01540}, {0x1101e90, 0xc00791e000}, 0xc019dde0f0, {0x10f1558, 0xc0189b26c0})
        /home/rfindley/src/tools2/gopls/internal/lsp/protocol/tsserver.go:505 +0x243a
golang.org/x/tools/gopls/internal/lsp/protocol.ServerHandler.func1({0x10f12b8, 0xc017e01540}, 0xc019dde0f0, {0x10f1558, 0xc0189b26c0})
        /home/rfindley/src/tools2/gopls/internal/lsp/protocol/protocol.go:157 +0x8a
golang.org/x/tools/gopls/internal/lsp/lsprpc.handshaker.func1({0x10f12b8, 0xc017e01540}, 0xc019dde0f0, {0x10f1558?, 0xc0189b26c0?})
        /home/rfindley/src/tools2/gopls/internal/lsp/lsprpc/lsprpc.go:519 +0x9d5
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1({0x10f12b8, 0xc017e01540}, 0xc0013ad110, {0x10f1558?, 0xc0189b26c0?})
        /home/rfindley/src/tools2/internal/jsonrpc2/handler.go:35 +0xe5
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2()
        /home/rfindley/src/tools2/internal/jsonrpc2/handler.go:103 +0x96
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1 in goroutine 3287406
        /home/rfindley/src/tools2/internal/jsonrpc2/handler.go:100 +0x1ed
exit status 2
@findleyr findleyr added this to the gopls/v0.12.0 milestone Mar 19, 2023
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Mar 19, 2023
@findleyr
Copy link
Contributor Author

CC @adonovan

@adonovan
Copy link
Member

adonovan commented Mar 31, 2023

Failure to check the error result from the toplevel call to the recursive collectImportPromises?

@findleyr
Copy link
Contributor Author

Duh, thanks for investigating.

Since this code has changed so much, let's close this issue.

@golang golang locked and limited conversation to collaborators Mar 30, 2024
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. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants