Repository navigation
TSServer maximum call stack crash #34726
Copy link
Copy link
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Description
TypeScript Version: 3.7.1-rc
Search Terms:
- processDirectory
- getCodeFixes
- tsserver
Repo
- In the VS Code code base, open
extension.ts: https://github.com/microsoft/vscode/blob/ecdba243ff6a17d1c274a916839ca991f0c36bc0/extensions/markdown-language-features/src/extension.ts#L48 - Write
new MarkdownPreview() - Trigger code actions on
MarkdownPreview. This should show an auto import
Bug:
Err 2679 [16:6:54.174] Exception on executing command {"seq":75,"type":"request","command":"getCodeFixes","arguments":{"file":"/Users/matb/projects/vscode/extensions/markdown-language-features/src/extension.ts","startLine":46,"startOffset":9,"endLine":46,"endOffset":24,"errorCodes":[2304]}}:
Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
at String.includes (<anonymous>)
at internal/fs/utils.js:202:29
at hidden (internal/errors.js:241:14)
at internal/fs/utils.js:429:15
at hidden (internal/errors.js:241:14)
at internal/fs/utils.js:438:3
at hidden (internal/errors.js:241:14)
at Object.openSync (fs.js:439:10)
at Object.func (electron/js2c/asar.js:138:31)
at Object.func [as openSync] (electron/js2c/asar.js:138:31)
at Object.readFileSync (fs.js:349:35)
at Object.fs.readFileSync (electron/js2c/asar.js:580:40)
at Object.fs.readFileSync (electron/js2c/asar.js:580:40)
at readFileWorker (/Users/matb/projects/vscode/node_modules/typescript/lib/tsserver.js:5364:34)
at Object.readFile (/Users/matb/projects/vscode/node_modules/typescript/lib/tsserver.js:5390:28)
at ConfiguredProject.Project.readFile (/Users/matb/projects/vscode/node_modules/typescript/lib/tsserver.js:134492:49)
at Object.createPackageJsonInfo (/Users/matb/projects/vscode/node_modules/typescript/lib/tsserver.js:104318:34)
at addOrUpdate (/Users/matb/projects/vscode/node_modules/typescript/lib/tsserver.js:138596:42)
at /Users/matb/projects/vscode/node_modules/typescript/lib/tsserver.js:138587:29
at Object.forEachAncestorDirectory (/Users/matb/projects/vscode/node_modules/typescript/lib/tsserver.js:6225:26)
at Object.searchDirectoryAndAncestors (/Users/matb/projects/vscode/node_modules/typescript/lib/tsserver.js:138581:24)
at processDirectory (/Users/matb/projects/vscode/node_modules/typescript/lib/tsserver.js:135407:46)
at processDirectory (/Users/matb/projects/vscode/node_modules/typescript/lib/tsserver.js:135408:36)
at processDirectory (/Users/matb/projects/vscode/node_modules/typescript/lib/tsserver.js:135408:36)
at processDirectory (/Users/matb/projects/vscode/node_modules/typescript/lib/tsserver.js:135408:36)
at processDirectory (/Users/matb/projects/vscode/node_modules/typescript/lib/tsserver.js:135408:36)
at processDirectory (/Users/matb/projects/vscode/node_modules/typescript/lib/tsserver.js:135408:36)
at processDirectory (/Users/matb/projects/vscode/node_modules/typescript/lib/tsserver.js:135408:36)
at processDirectory (/Users/matb/projects/vscode/node_modules/typescript/lib/tsserver.js:135408:36)
...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Activity
sandersn commentedon Oct 25, 2019
I can't repro this in emacs, and the stack looks very strange -- not particularly related to getCodeFixes. Sheetal Nandi (@sheetalkamat) mind taking a look at this?
sheetalkamat commentedon Oct 25, 2019
Doesn't seem to repro for me.. tried vscode as well as insiders build
mjbvz commentedon Oct 25, 2019
Now I can't repo this either. Not sure if my project was in a bad state or what but I'll reopen if I see this again
mjbvz commentedon Nov 4, 2019
Seeing this again with 3.8.0-dev.20191102. Repo:
git clone https://github.com/kasvtv/vscode-node-autocomplete.gitindex.jsand trigger suggestions at end of fileTS Server log:
Details
[-]getCodeFixes maximum call stack crash[/-][+]TSServer maximum call stack crash [/+]Use empty object for invalid package json contents instead of undefined
Use empty object for invalid package json contents instead of undefin…
sheetalkamat commentedon Nov 7, 2019
TypeScript Bot (@typescript-bot) cherry-pick this to release-3.7
Cherry-pick PR microsoft#34906 into release-3.7
Cherry-pick PR #34906 into release-3.7 (#35006)