JS Code with static block exposes 3 issues: Crashes TypeScript language service, ErrorReporter typescript version bug, & lingering bash.exe
processes leading to "console allocation failure"
#46468
Labels
Bug
A bug in TypeScript
Crash
For flagging bugs which are compiler or service crashes or unclean exits, rather than bad output
Domain: JavaScript
The issue relates to JavaScript specifically
Fix Available
A PR has been opened for this issue
Fixed
A PR has been merged for this issue
Milestone
Uh oh!
There was an error while loading. Please reload this page.
Does this issue occur when all extensions are disabled?: Yes
1.61.2 (system setup)
& maybe?1.61.0 (system setup)
Win10 Education 20H2 (OS Build 19042.1237)
This was occurring on an earlier version which prompted me to finally click
Help -> Install Update
. The new version exhibits the same issue. I did not make a note of the version I was coming from, but I can't recall doing an update in the last 7 days so it might be earlier than1.61.1
.Steps to Reproduce:
Create a javascript file anywhere, or not, this will crash the TypeScript language service even in an unsaved new tab.
Paste the following code: [BUG # 1]:
Reload Window
or close vscode and relaunch it. This may only occur if a tab is open with the above code on vscode statup or Typescript Language Service startup. I can't check now because of bash.exe side-effect ([BUG # 3] further down) caused by this bug.With the TypeScript language service now crashed > 5 times. The ErrorReporter will prompt you to report the error.
[BUG # 3]: The TypeScript Server crashing is resulting in lingering

bash
shells and apparently there is a limit of 32.[BUG # 4]: VSCode refuses to display the
PROBLEMS OUTPUT DEBUG CONSOLE TERMINAL
panel if the terminal can't be started.EDIT2:
I failed to mention the issue with the TypeScript language service crashing has existed for well over a month, maybe months even. Until this point I would just ignore it and avoid the file that causes the crash. I never tried to report the issue in the past because I was in fact using an older TypeScript version.
Today I finally became annoyed enough to look into it after running into and being impeded for the n-th time by the
fatal error - console device allocation failure
- which breaks unrelated things system wide.I slowly removed code from that file until I was left with only the code that would cause the crash, then simplified it further to the 7 line snippet above.
After finding the root cause, I updated my typescript version to latest so that I could submit the issue. Then the rabbit hole got deeper.
EDIT3:
I originally submitted this to the vscode repo instead of the TypeScript repo because my primary beef is with vscode leaving bash.exe consoles open. I also thought the ErrorReporter being broken was a vscode thing.
Yes, the root cause is the TypeScript language server, but I feel vscode's handling of a failed language server is poor.
The text was updated successfully, but these errors were encountered: