Change:
level: number, levelPerBracketType: Map<string, number> ) { <ins> if (level > 200) { return; } </ins> if (node.kind === AstNodeKind.Pair) { let levelPerBracket = 0; if (levelPerBracketType) {

Discussion:
Issue Type: <bBug</bThe file has more than 10,000 lines, and when searching something in the file, the file become freezed, and the information indicates that "Maximum call stack size exceeded". VS Code version: Code 1.68.0 (, 2022-06-08T11:44:00.250Z) OS version: Darwin x64 21.5.0 Restricted Mode: No <details<summaryExtensions (12)</summaryExtensionVersion ------ vscode-eslint2.2.2 prettier-vscode9.5.0 intellij-idea-keybindings1.5.1 file-downloader1.0.12 csharp1.25.0 azure-account0.10.1 vscode-yaml1.8.0 code-spell-checker2.2.4 vscodeintellicode1.2.21 vscode-java-debug0.41.0 vscode-java-pack0.23.0 vscode-icons11.12.0 </details<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
Are you using cmd+f to search? Where do you see that error, is there a stack in developer tools (Help Toggle developer tools)?
Yes, I use ctrl+F to search for some words. And when I scroll up and down, the editor can't respond. When I switch to some small files, it works as usual.
Is there any update about this issue?
Any update or solution? It has blocked me for more than 1 week.
I could not reproduce. Here I have a file with over 20k+ matches: https://user- Here is the deminified stack: ERR&nbsp;Failed&nbsp;to&nbsp;execute&nbsp;'removeChild'&nbsp;on&nbsp;'Node':&nbsp;The&nbsp;node&nbsp;to&nbsp;be&nbsp;removed&nbsp;is&nbsp;not&nbsp;a&nbsp;child&nbsp;of&nbsp;this&nbsp;node.

:&nbsp;Error:&nbsp;Failed&nbsp;to&nbsp;execute&nbsp;'removeChild'&nbsp;on&nbsp;'Node':&nbsp;The&nbsp;node&nbsp;to&nbsp;be&nbsp;removed&nbsp;is&nbsp;not&nbsp;a&nbsp;child&nbsp;of&nbsp;this&nbsp;node.<br/&nbsp;&nbsp;at&nbsp;<br/&nbsp;&nbsp;at&nbsp;<br/&nbsp;&nbsp;at&nbsp;<br/&nbsp;&nbsp;at&nbsp;<br/&nbsp;&nbsp;at&nbsp;<br/&nbsp;&nbsp;at&nbsp;<br/&nbsp;&nbsp;at&nbsp;<br/&nbsp;&nbsp;at&nbsp;<br/&nbsp;&nbsp;at&nbsp;<br/&nbsp;&nbsp;at&nbsp;<br/
Hi (1) At the beginning, I tried to uninstall all my VS Code Extensions, it didn't work. (2) Then I tried to clear all my user setting config, it didn't work. (3) It seems that I login with MS work account, when I signed out, it works again! It seems that there is some edge case related to "Sign in with Microsoft" option. Hope this would help you!
This is not possible. The editor find in file functionality is unrelated to being logged in or not. More likely, this has been a coincidence and something else was changed as well. Could you perhaps post a screen recording of the steps you are doing, maybe we can spot something relevant in there?
Sorry that I can't reproduce it. I remember when I scroll up/ scroll down for a while, the file behaves really weird: (1) The text in the editor will disappear line by line (2) The file become freeze, I couldn't do anything except close the file. (3) When I close the file and reopen it, it will work for a while, and then got freeze again. I think I need add more information here. The issue first happened on my Windows desktop machine, and I couldn't edit only one large file, other files are okay to edit, scroll and search. Then I tried to use my VSCode on my Macbook, and I login in VSCode with my work account, and the setting sync function is on, I found that I couldn't edit the same file from Macbook.

I thought it could be a setting issue, but I couldn't find any good solution for this. I think it's a corner case that is not easy to find. I also created a file with more than 100K lines, but it works very well for that file. I have several assumptions, maybe it's caused by (1) I've been login in the Microsoft account for several months (2) I've been using my account and turned my sync setting option on. (3) The config file contains a lot of symbols such as "=","[","]", ":", "_", ".", "-". "". ",". If I found the same issue, I will ping you directly. Thanks a lot for your help!
Thank you for your prompt reply. I'd love to have a reproducible case, so if you manage to find it, please let me know. It might be triggered by a combination of a specific file + specific settings. The easiest way to narrow things down for settings is to comment out half the settings, and check if the problem reproduces. If the problem reproduces, comment out half of the remaining settings. If the problem doesn't reproduce, then try commenting out the other half. For the file case, you can try to save the file as plain text. If that keeps reproducing, you can try to save it in a new, fresh folder (without any vscode settings). You can try to delete half the file and check if the issue persists, and similar to the settings troubleshooting run a sort of binary search until you narrow in on the problem.
This issue has been closed automatically because it needs more information and has not had recent activity. See also our guidelines. Happy Coding!
To reproduce, open the repro file and click on the last line. Here is the call stack:
The provided file is heavily unbalanced, as the is interpreted as comment. I think the fix here is to just limit recursion depth.
Can you please provide the file to verify?