microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.98k stars 29.19k forks source link

TS Server fatal error: Maximum call stack size exceeded #187685

Closed Mohan29997 closed 1 year ago

Mohan29997 commented 1 year ago

Type: Bug

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

TypeScript Version: 5.1.3

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: semantic

RangeError: Maximum call stack size exceeded
    at lookAhead (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:31113:21)
    at isParenthesizedArrowFunctionExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33406:14)
    at tryParseParenthesizedArrowFunctionExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33393:22)
    at parseAssignmentExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33301:29)
    at parseExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33272:16)
    at doOutsideOfContext (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:30955:12)
    at allowInAnd (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:30976:12)
    at parseParenthesizedExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:34414:24)
    at parsePrimaryExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:34376:16)
    at parseMemberExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33823:24)
    at parseLeftHandSideExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33817:82)
    at parseUpdateExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33792:24)
    at parseUnaryExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33711:32)
    at parseBinaryExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33633:25)
    at parseAssignmentExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33306:18)
    at parseExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33272:16)
    at doOutsideOfContext (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:30955:12)
    at allowInAnd (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:30976:12)
    at parseParenthesizedExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:34414:24)
    at parsePrimaryExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:34376:16)
    at parseMemberExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33823:24)
    at parseLeftHandSideExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33817:82)
    at parseUpdateExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33792:24)
    at parseUnaryExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33711:32)
    at parseBinaryExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33633:25)
    at parseAssignmentExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33306:18)
    at parseExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33272:16)
    at doOutsideOfContext (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:30955:12)
    at allowInAnd (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:30976:12)
    at parseParenthesizedExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:34414:24)
    at parsePrimaryExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:34376:16)
    at parseMemberExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33823:24)
    at parseLeftHandSideExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33817:82)
    at parseUpdateExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33792:24)
    at parseUnaryExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33711:32)
    at parseBinaryExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33633:25)
    at parseAssignmentExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33306:18)
    at parseExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33272:16)
    at doOutsideOfContext (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:30955:12)
    at allowInAnd (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:30976:12)
    at parseParenthesizedExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:34414:24)
    at parsePrimaryExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:34376:16)
    at parseMemberExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33823:24)
    at parseLeftHandSideExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33817:82)
    at parseUpdateExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33792:24)
    at parseUnaryExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33711:32)
    at parseBinaryExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33633:25)
    at parseAssignmentExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33306:18)
    at parseExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33272:16)
    at doOutsideOfContext (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:30955:12)
    at allowInAnd (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:30976:12)
    at parseParenthesizedExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:34414:24)
    at parsePrimaryExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:34376:16)
    at parseMemberExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33823:24)
    at parseLeftHandSideExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33817:82)
    at parseUpdateExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33792:24)
    at parseUnaryExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33711:32)
    at parseBinaryExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33633:25)
    at parseAssignmentExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33306:18)
    at parseExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33272:16)
    at doOutsideOfContext (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:30955:12)
    at allowInAnd (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:30976:12)
    at parseParenthesizedExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:34414:24)
    at parsePrimaryExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:34376:16)
    at parseMemberExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33823:24)
    at parseLeftHandSideExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33817:82)
    at parseUpdateExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33792:24)
    at parseUnaryExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33711:32)
    at parseBinaryExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33633:25)
    at parseAssignmentExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33306:18)
    at parseExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33272:16)
    at doOutsideOfContext (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:30955:12)
    at allowInAnd (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:30976:12)
    at parseParenthesizedExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:34414:24)
    at parsePrimaryExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:34376:16)
    at parseMemberExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33823:24)
    at parseLeftHandSideExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33817:82)
    at parseUpdateExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33792:24)
    at parseUnaryExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33711:32)
    at parseBinaryExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33633:25)
    at parseAssignmentExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33306:18)
    at parseExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33272:16)
    at doOutsideOfContext (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:30955:12)
    at allowInAnd (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:30976:12)
    at parseParenthesizedExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:34414:24)
    at parsePrimaryExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:34376:16)
    at parseMemberExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33823:24)
    at parseLeftHandSideExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33817:82)
    at parseUpdateExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33792:24)
    at parseUnaryExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33711:32)
    at parseBinaryExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33633:25)
    at parseAssignmentExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33306:18)
    at parseExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33272:16)
    at doOutsideOfContext (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:30955:12)
    at allowInAnd (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:30976:12)
    at parseParenthesizedExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:34414:24)
    at parsePrimaryExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:34376:16)
    at parseMemberExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33823:24)
    at parseLeftHandSideExpressionOrHigher (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33817:82)
    at parseUpdateExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:33792:24)

VS Code version: Code 1.80.0 (Universal) (660393deaaa6d1996740ff4880f1bad43768c814, 2023-07-04T13:39:33.766Z) OS version: Darwin arm64 22.5.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 (8 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|2, 2, 2| |Memory (System)|8.00GB (0.32GB free)| |Process Argv|--crash-reporter-id 7229ad2c-3962-400c-ae5a-a9a54c4d86fe| |Screen Reader|no| |VM|0%|
Extensions (3) Extension|Author (truncated)|Version ---|---|--- vscode-eslint|dba|2.4.2 prettier-vscode|esb|9.19.0 postman-for-vscode|Pos|0.3.0
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 pythonvs932:30410667 py29gd2263cf:30784848 vsclangdc:30486549 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 vscccc:30610679 282f8724:30602487 pyind779:30671433 f6dab269:30613381 pythonsymbol12:30671437 2i9eh265:30646982 showlangstatbar:30737416 vsctsb:30748421 pythonms35:30701012 a2ce3375:30757347 pythonfmttext:30731395 pythoncmv:30756943 fixshowwlkth:30771522 showindicator:30785052 pythongtdpath:30769146 i26e3531:30780429 pythonnosmt12:30779714 pythonidxpt:30784022 pythonnoceb:30776495 h7j2d465:30786200 ```
mjbvz commented 1 year ago

Does this reproduce in the latest VS Code insiders build with all extensions disabled?

If it does, please share an example project which demonstrates the issue

vscodenpa commented 1 year ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!