Skip to content

panic: cache entry not found [recovered, repanicked] #2574

@joepjoosten

Description

@joepjoosten
  • Version: 7.0.0-dev.20260122.4

Stack trace

Updated watches in 180.590958ms
Processed 1 file changes in 3.433416ms
Updated watches in 52.379375ms
panic: cache entry not found [recovered, repanicked]

goroutine 2881157 [running]:
github.com/microsoft/typescript-go/internal/project.(*Snapshot).Clone.func1()
	github.com/microsoft/typescript-go/internal/project/snapshot.go:229 +0xc0
panic({0x102dce920?, 0x103022940?})
	runtime/panic.go:783 +0x120
github.com/microsoft/typescript-go/internal/project.(*RefCountCache[...]).Ref(0x1030443e0, {{{0x140002d2dc0, 0x93}, {0x141035b4b40, 0x93}, {0x0}, {0x0, 0x1}, 0x0}, 0x3, ...})
	github.com/microsoft/typescript-go/internal/project/refcountcache.go:64 +0x1e0
github.com/microsoft/typescript-go/internal/project.(*Snapshot).Clone(0x14029434510, {0x10302e6c8, 0x1402a893cb0}, {{{0x14074852350, 0x1, 0x1}, {0x0, 0x0, 0x0}, 0x0, ...}, ...}, ...)
	github.com/microsoft/typescript-go/internal/project/snapshot.go:431 +0x13e0
github.com/microsoft/typescript-go/internal/project.(*Session).UpdateSnapshot(0x1400016e000, {0x10302e6c8, 0x1402a893cb0}, 0x140c58ba900, {{{0x14074852350, 0x1, 0x1}, {0x0, 0x0, 0x0}, ...}, ...})
	github.com/microsoft/typescript-go/internal/project/session.go:557 +0xe0
github.com/microsoft/typescript-go/internal/project.(*Session).getSnapshot(0x1400016e000, {0x10302e6c8, 0x1402a893cb0}, {{0x14074852350, 0x1, 0x1}, {0x0, 0x0, 0x0}, 0x0, ...})
	github.com/microsoft/typescript-go/internal/project/session.go:460 +0x3e8
github.com/microsoft/typescript-go/internal/project.(*Session).getSnapshotAndDefaultProject(0x1400016e000, {0x10302e6c8, 0x1402a893cb0}, {0x140e1ee0200, 0x7d})
	github.com/microsoft/typescript-go/internal/project/session.go:469 +0xb0
github.com/microsoft/typescript-go/internal/project.(*Session).GetLanguageService(0x1400fa625b8?, {0x10302e6c8?, 0x1402a893cb0?}, {0x140e1ee0200?, 0x25a4ff3d?})
	github.com/microsoft/typescript-go/internal/project/session.go:481 +0x28
github.com/microsoft/typescript-go/internal/lsp.init.func1.registerLanguageServiceDocumentRequestHandler[...].12({0x10302e6c8, 0x1402a893cb0}, 0x1402fe39860)
	github.com/microsoft/typescript-go/internal/lsp/server.go:654 +0x94
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleRequestOrNotification(0x1400019ee08, {0x10302e700?, 0x1402c717db0?}, 0x1402fe39860)
	github.com/microsoft/typescript-go/internal/lsp/server.go:531 +0x170
github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop.func1()
	github.com/microsoft/typescript-go/internal/lsp/server.go:414 +0x34
created by github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop in goroutine 34
	github.com/microsoft/typescript-go/internal/lsp/server.go:438 +0x7d8

Steps to reproduce

  1. Not sure. stopped getting hover "textDocument/diagnostic" on function in Zed editor. maybe it stopped a little earlier...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions