microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
100.2k stars 12.38k forks source link

TS Server fatal error: Debug Failure. False expression. #55861

Closed Syed-Shayan-01 closed 1 month ago

Syed-Shayan-01 commented 12 months ago

Type: Bug

❗️❗️❗️ Please fill in the sections below to help us diagnose the issue ❗️❗️❗️

TypeScript Version: 5.2.2

Steps to reproduce crash

1. 2. 3.

TS Server Log

❗️ Server logging disabled. To help us fix crashes like this, please enable logging by setting:

"typescript.tsserver.log": "verbose"

After enabling this setting, future crash reports will include the server log.

TS Server Error Stack

Server: syntax

Error: Debug Failure. False expression.
    at _LineIndex.edit (c:\Users\Syed Shayan\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:185422:13)
    at _ScriptVersionCache._getSnapshot (c:\Users\Syed Shayan\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:185260:31)
    at _ScriptVersionCache.lineOffsetToPosition (c:\Users\Syed Shayan\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:185279:17)
    at TextStorage.lineOffsetToPosition (c:\Users\Syed Shayan\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:175492:22)
    at ScriptInfo.lineOffsetToPosition (c:\Users\Syed Shayan\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:175811:29)
    at c:\Users\Syed Shayan\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:182253:41
    at mapDefinedIterator (c:\Users\Syed Shayan\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:2681:19)
    at mapDefinedIterator.next (<anonymous>)
    at _ProjectService.applyChangesToFile (c:\Users\Syed Shayan\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:181077:16)
    at _ProjectService.applyChangesInOpenFiles (c:\Users\Syed Shayan\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:181048:14)
    at updateOpen (c:\Users\Syed Shayan\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:182242:29)
    at c:\Users\Syed Shayan\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:184838:69
    at IpcIOSession.executeWithRequestId (c:\Users\Syed Shayan\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:184830:14)
    at IpcIOSession.executeCommand (c:\Users\Syed Shayan\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:184838:29)
    at IpcIOSession.onMessage (c:\Users\Syed Shayan\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:184880:51)
    at process.<anonymous> (c:\Users\Syed Shayan\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:186461:14)
    at process.emit (node:events:513:28)
    at emit (node:internal/child_process:937:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

VS Code version: Code 1.82.2 (abd2f3db4bdb28f9e95536dfa84d8479f1eb312d, 2023-09-14T05:55:25.390Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz (4 x 3093)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: unavailable_off
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: unavailable_off
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|3.91GB (0.44GB free)| |Process Argv|--crash-reporter-id 2dab6bb3-9330-4ff3-8cd6-862b56118765| |Screen Reader|no| |VM|0%|
Extensions (9) Extension|Author (truncated)|Version ---|---|--- vscode-tailwindcss|bra|0.10.0 es7-react-js-snippets|dsz|4.4.3 prettier-vscode|esb|10.1.0 auto-rename-tag|for|0.1.10 vscode-power-mode|hoo|3.0.2 postman-for-vscode|Pos|0.9.0 LiveServer|rit|5.7.9 highlight-matching-tag|vin|0.11.0 vscode-icons|vsc|12.5.0
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 pythonvs932:30410667 vsclangdf:30486550 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 3biah626:30602489 f6dab269:30613381 showlangstatbar:30737416 03d35959:30757346 pythonfmttext:30731395 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 pythonnosmt12:30797651 pythonidxptcf:30805731 pythonnoceb:30805159 copilotsettingt:30839829 asynctok:30821568 dsvsc013:30795093 dsvsc014:30804076 diffeditorv2:30821572 dsvsc015:30829745 ```
RyanCavanaugh commented 11 months ago

Please provide a way to reproduce the issue. Thanks!