-
Notifications
You must be signed in to change notification settings - Fork 714
Closed
Labels
Description
Stack trace
======== Cache Statistics ========
[18:44:25.932] Open file count: 1
[18:44:25.932] Cached disk files: 5789
[18:44:25.932] Project count: 1
[18:44:25.932] Config count: 6
[18:44:25.932] Parse cache size: 5139
[18:44:25.932] Program count: 1
[18:44:25.932] Extended config cache size: 0
panic handling request textDocument/definition runtime error: invalid memory address or nil pointer dereference goroutine 36262 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:26 +0x64
github.com/microsoft/typescript-go/internal/lsp.(*Server).recover(0x14000000f00, 0x1406574f3b0)
github.com/microsoft/typescript-go/internal/lsp/server.go:541 +0x44
panic({0x104c19c40?, 0x1053afdb0?})
runtime/panic.go:783 +0x120
github.com/microsoft/typescript-go/internal/project.(*diskFile).Content(0x14065a3e2a0?)
<autogenerated>:1
github.com/microsoft/typescript-go/internal/project.(*Snapshot).ReadFile(0x110?, {0x14065ad59e0?, 0x1?})
github.com/microsoft/typescript-go/internal/project/snapshot.go:109 +0x38
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).ReadFile(0x14065ad59e0?, {0x14065ad59e0?, 0x14003b97320?})
github.com/microsoft/typescript-go/internal/ls/languageservice.go:58 +0x28
github.com/microsoft/typescript-go/internal/sourcemap.GetDocumentPositionMapper({0x104dfe270, 0x14065ad1200}, {0x14003b97320, 0x110})
github.com/microsoft/typescript-go/internal/sourcemap/source_mapper.go:250 +0x208
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).GetDocumentPositionMapper(0x14065ad1200, {0x14003b97320, 0x110})
github.com/microsoft/typescript-go/internal/ls/languageservice.go:51 +0x60
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).tryGetSourcePositionWorker(0x14065ad1200, {0x14003b97320, 0x110}, 0x0)
github.com/microsoft/typescript-go/internal/ls/source_map.go:72 +0x48
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).tryGetSourcePosition(0x14065ad1200, {0x14003b97320?, 0x1401140c000?}, 0x4b3?)
github.com/microsoft/typescript-go/internal/ls/source_map.go:55 +0x24
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).getMappedLocation(0x14065ad1200, {0x14003b97320, 0x110}, {0x4930660?, 0x1?})
github.com/microsoft/typescript-go/internal/ls/source_map.go:12 +0x30
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).createLocationsFromDeclarations(0x14065ad1200, {0x1405913c6e0, 0x1, 0x1400ba96f08?})
github.com/microsoft/typescript-go/internal/ls/definition.go:108 +0x114
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).ProvideDefinition(0x14065ad1200, {0x104dfea50, 0x1406217b130}, {0x1406575c080?, 0x1405f974f00?}, {0x280?, 0x0?})
github.com/microsoft/typescript-go/internal/ls/definition.go:57 +0x314
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleDefinition(0x140000f2380?, {0x104dfea50?, 0x1406217b130?}, 0x1406575c080?, 0x76?)
github.com/microsoft/typescript-go/internal/lsp/server.go:747 +0x38
github.com/microsoft/typescript-go/internal/lsp.init.func1.registerLanguageServiceDocumentRequestHandler[...].13({0x104dfea50, 0x1406217b130}, 0x1406574f3b0)
github.com/microsoft/typescript-go/internal/lsp/server.go:527 +0xf0
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleRequestOrNotification(0x14000000f00, {0x104dfea50, 0x1406217b130}, 0x1406574f3b0)
github.com/microsoft/typescript-go/internal/lsp/server.go:424 +0xf4
github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop.func1()
github.com/microsoft/typescript-go/internal/lsp/server.go:329 +0x34
created by github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop in goroutine 34
github.com/microsoft/typescript-go/internal/lsp/server.go:349 +0x6f8
[Error - 6:45:02 PM] Request textDocument/definition failed.
Message: InternalError: panic handling request textDocument/definition: runtime error: invalid memory address or nil pointer dereference
Code: -32603
Steps to reproduce
Unfortunately I don't know how to reproduce it.
typescriptteam.native-preview
Version
0.20251003.2
lyleunderwood