Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode freezes when open specific JSON #93370

Closed
Smoovsky opened this issue Mar 25, 2020 · 8 comments
Closed

vscode freezes when open specific JSON #93370

Smoovsky opened this issue Mar 25, 2020 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-bracket-matching Editor brace matching freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues verified Verification succeeded
Milestone

Comments

@Smoovsky
Copy link

  • VSCode Version: 1.43.2
  • OS Version: win10-x64 1903

Steps to Reproduce:

  1. open the JSON file
  2. try to interact with the editor a bit (select text, type, etc..)
  3. vscode freezes

Does this issue occur when all extensions are disabled?: Yes

The JSON file sizes 2.5MB with moderate complexity.
I tried on two machines with extensions disabled, both were able to reproduce the issue.

Tried:
"editor.largeFileOptimizations": true, "files.maxMemoryForLargeFilesMB": 12288,
didn't help.

Also, it seems that keeping the ".txt" file extension has a better chance to freeze the editor sooner than having ".json" file extension,

Once downgrade back to 1.42.1, the problem is gone and the editor is considerably more responsive (with 1.43.2, the editor was laggy after open the JSON before it crashes).

See the sample JSON:
scrambledJson.txt

@aeschli
Copy link
Contributor

aeschli commented Mar 26, 2020

This looks like a general issue with the editor and large file sizes: I can reproduce that even in plain text mode, editing the file is very sluggish.

@aeschli aeschli assigned alexdima and unassigned aeschli Mar 26, 2020
@davidnich
Copy link

possibly related issue: #93310

@alexdima
Copy link
Member

I have found this to be caused by bracket matching, specifically the way in which the reverse string is computed. A workaround is to use "editor.matchBrackets": "never".

@alexdima alexdima added editor-bracket-matching Editor brace matching freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues bug Issue identified by VS Code Team member as probable bug and removed perf labels Mar 29, 2020
@alexdima alexdima added this to the March 2020 milestone Mar 29, 2020
@roblourens
Copy link
Member

I opened the file in insiders and it still hangs

image

@roblourens roblourens reopened this Apr 3, 2020
@roblourens roblourens added the verification-found Issue verification failed label Apr 3, 2020
@alexr00 alexr00 modified the milestones: March 2020, April 2020 Apr 6, 2020
@alexdima
Copy link
Member

@roblourens I have tried with VS Code stable (which should be the same version you used for verification), but the file does not freeze for me.

@Smoovsky Can you please verify if opening the file leads to a no longer responding dialog?

@alexdima alexdima added info-needed Issue requires more information from poster and removed verification-found Issue verification failed bug Issue identified by VS Code Team member as probable bug labels Apr 24, 2020
@alexdima alexdima removed this from the April 2020 milestone Apr 24, 2020
@roblourens
Copy link
Member

Tried again and got the same result. And this is without editor.matchBrackets or any other settings set.

@Smoovsky
Copy link
Author

Smoovsky commented Apr 24, 2020

@alexdima I'm on 1.44.0 now, still able to reproduce this issue:
image


Crash on 1.44.2 as well

@alexdima
Copy link
Member

Thank you, after more trying I was able to reproduce too.

@alexdima alexdima removed the info-needed Issue requires more information from poster label Apr 27, 2020
@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Apr 27, 2020
@alexdima alexdima added this to the April 2020 milestone Apr 27, 2020
leilapearson pushed a commit to relmify/vscode that referenced this issue Apr 27, 2020
@jrieken jrieken added the verified Verification succeeded label Apr 30, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jun 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-bracket-matching Editor brace matching freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

8 participants
@roblourens @jrieken @alexdima @aeschli @davidnich @Smoovsky @alexr00 and others