Skip to content

Maximum call stack size exceeded, renderer frozen for a couple of seconds #279792

@jrieken

Description

@jrieken
  • in TS
  • type a line comment
  • 💥 the renderer freezes
ERR Maximum call stack size exceeded: RangeError: Maximum call stack size exceeded
    at vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:474:21636
    at Array.map (<anonymous>)
    at t8e (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:474:21632)
    at t8e (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:474:21710)
    at t8e (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:474:21710)
    at t8e (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:474:21710)
    at t8e (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:474:21710)
    at t8e (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:474:21710)
    at t8e (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:474:21710)
    at t8e (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:474:21710)
error @ log.ts:460
log.ts:450  WARN [perf] Renderer reported VERY LONG TASK (4300ms), starting profiling session '0ef14a00-918b-4552-86e0-b44ff7bb8a03'
warn @ log.ts:450

I have clicked around on the callstack and I can confidently say that this comes from here

function mapDeep(value: unknown, replacer: (value: unknown) => unknown): unknown {
const val = replacer(value);
if (Array.isArray(val)) {
return val.map(v => mapDeep(v, replacer));
} else if (isObject(val)) {
const result: Record<string, unknown> = {};
for (const [key, value] of Object.entries(val)) {
result[key] = mapDeep(value, replacer);
}
return result;
}
return val;
}

Metadata

Metadata

Assignees

Labels

freeze-slow-crash-leakVS Code crashing, performance, freeze and memory leak issuesimportantIssue identified as high-priorityinsiders-releasedPatch has been released in VS Code Insiders

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions