-
Notifications
You must be signed in to change notification settings - Fork 690
Closed
Labels
CrashDomain: EditorRelated to the LSP server, editor experienceRelated to the LSP server, editor experience
Description
I got this error a few times in a row whilst hovering a symbol, before suddenly ts-go started behaving itself and showing me the correct type info.
If these reports aren't useful, feel free to close.
Info 22698[15:56:45.232] getConfigFileNameForFile:: File: c:/Projects/a/b/c/tsconfig.json ProjectRootPath: :: Result: c:/Projects/a/b/tsconfig.json
panic handling request textDocument/diagnostic runtime error: invalid memory address or nil pointer dereference goroutine 3786730 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:26 +0x5e
github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop.func1.1()
github.com/microsoft/typescript-go/internal/lsp/server.go:359 +0x5d
panic({0x12f53c0?, 0x1b082e0?})
runtime/panic.go:792 +0x132
github.com/microsoft/typescript-go/internal/project.(*ScriptInfo).reloadIfNeeded(0xc0fd7f6180?)
github.com/microsoft/typescript-go/internal/project/scriptinfo.go:80 +0x12
github.com/microsoft/typescript-go/internal/project.(*ScriptInfo).Version(...)
github.com/microsoft/typescript-go/internal/project/scriptinfo.go:69
github.com/microsoft/typescript-go/internal/project.(*snapshot).GetLineMap(0xc346330cc0, {0xc0ae9ba180?, 0xc354a51b78?})
github.com/microsoft/typescript-go/internal/project/project.go:51 +0x7a
github.com/microsoft/typescript-go/internal/ls.(*Converters).PositionToLineAndCharacter(0xc209fec498, {0x15dfb50, 0xc0d9e26dc8}, 0x1aa3)
github.com/microsoft/typescript-go/internal/ls/converters.go:219 +0x3b
github.com/microsoft/typescript-go/internal/ls.(*Converters).ToLSPRange(0xc209fec498, {0x15dfb50, 0xc0d9e26dc8}, {0x550fccc0?, 0xc3?})
github.com/microsoft/typescript-go/internal/ls/converters.go:35 +0x26
github.com/microsoft/typescript-go/internal/ls.toLSPDiagnostic(0xc209fec498, 0xc3550fccc0)
github.com/microsoft/typescript-go/internal/ls/diagnostics.go:88 +0x35f
github.com/microsoft/typescript-go/internal/ls.toLSPDiagnostics(0xc209fec498, {0xc354a51de8?, 0xc0fd802230?, 0xc0d9e26dc8?})
github.com/microsoft/typescript-go/internal/ls/diagnostics.go:46 +0x11a
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).GetDocumentDiagnostics(0xc348bdc720, {0x15e0dd0, 0xc0fd802230}, {0xc02d4a7560?, 0xc152b21680?})
github.com/microsoft/typescript-go/internal/ls/diagnostics.go:32 +0x22a
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleDocumentDiagnostic(0xc0000eadc0, {0x15e0dd0, 0xc0fd802230}, 0xc002191050)
github.com/microsoft/typescript-go/internal/lsp/server.go:637 +0xc6
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleRequestOrNotification(0xc0f8b07088?, {0x15e0dd0?, 0xc0fd802230?}, 0xc1f4cdde00?)
github.com/microsoft/typescript-go/internal/lsp/server.go:482 +0x1b9
github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop.func1()
github.com/microsoft/typescript-go/internal/lsp/server.go:372 +0x75
created by github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop in goroutine 9
github.com/microsoft/typescript-go/internal/lsp/server.go:390 +0x4d2
[Error - 3:56:45 PM] Request textDocument/diagnostic failed.
Message: InternalError: panic handling request textDocument/diagnostic: runtime error: invalid memory address or nil pointer dereference
Code: -32603
mjbvz
Metadata
Metadata
Assignees
Labels
CrashDomain: EditorRelated to the LSP server, editor experienceRelated to the LSP server, editor experience