VScode crashed (reason: 'oom', code: '-536870904')
Asked Answered
D

11

15

I am trying to open a folder that I opened before, but it crashed. I can open other projects, and restarting the computer didn't help.

Maybe it's because I had a big file opened (400mb) in this folder, but I cant close this file because the vscode crashing every time when I tried open the workspace..

https://github.com/microsoft/vscode/issues/126127 https://github.com/microsoft/vscode/issues/130375

Dorene answered 25/3, 2022 at 9:44 Comment(0)
O
9

I had the same problem. Just delete the folders under %appdata%/code/backups/ and restart VS.

Oleum answered 25/4, 2022 at 10:33 Comment(3)
I have tried this, but did not help.. anyone found another solution?Fehr
It did not help me either.Tupi
Thank you. If someone posted this solution on the myriad of unanswered github issues, it would help a lot of people. Another common solution seems to be switching off gpu acceleration, although that did not help for me.Genotype
S
6

Not worry much about that!, same issue occurred in my pc but there is easy steps to fix this error as following.

solution: Enable "paging files" option OR increase virtual memory.

steps:

1). Right click on "ThisPC" or "MyPC" and go to properties. then go to "Advanced System setting". [ you can also find that using SEARCH button ]

2). then click on settings of Performance block. its open another pop-up window in that ,go to the "advanced" option .

3). you can see the Virtual memory section ,in that click on change button.

4). now first disable the checkbox of "Automatically manage paging file size for all drive".

-> and select the "custom size:"

-> in Initial size(MB): { you need to add the same value as recommended, which is also displayed downside section }

-> in Maximum size(MB): you need to enter the value that you get multiply by 3 of your allocated RAM size.

for example: your pc's ram is 4 gb then you can enter 4098*3= "12288mb".

then set it , click ok, ok, ok, and then just RESTART your pc. 🥹

hope god will help you.

Shophar answered 8/2, 2023 at 14:59 Comment(1)
This has nothing to with computer RAM or heap. I have this error and more than half of RAM is free.Irregular
I
2

If you are using VSCode, just press Ctrl+, (go to settings), search "Large File Optimizations" and mark the checkbox.

Implant answered 18/3, 2023 at 8:57 Comment(1)
What does this option do?Wayworn
A
2

I managed to solve my problem. The problem was generated due to a very large file that was backed up. Even if I deleted the file, the problem persisted. VS Code keeps backups of file changes. Somehow after I delete the file internally it must do a check and in this case the file was too big and probably couldn't open it and thus caused an internal error. I followed the instructions from this link https://bobbyhadz.com/blog/vscode-taking-too-much-memory

Topic: Try to delete your backups directory

Anthropophagite answered 29/6, 2023 at 17:11 Comment(0)
D
1

I solved the problem by restarting my computer and then opening VS code from a different folder. To open large JSON files, I use Dadroit JSON Viewer, thus preventing the problem from repeating itself.

Dorene answered 20/9, 2022 at 5:23 Comment(0)
C
1

For me, the VS code crashes when I open a Remote-SSH session which consists of a large folder. Since the history of the whole session is stored in our Windows user profile the RAM consumption of VS code will keep on increasing and finally crashes with an OOM(Out Of Memory) Error. I solved this issue by deleting the .vscode folder inside my user folder of Windows. Mostly something like this "C:\Users\your user name\.vscode"

Cute answered 2/8, 2023 at 10:33 Comment(0)
V
0

I solved the problem by deleting .vscode folder from my application folder.

Vano answered 1/8, 2023 at 7:43 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Stochmal
T
0

encountered the same OOM(Out of memory) issue in windows. Below steps worked fine for me.

Tried Solution:

a) Deleted all the files from C:\Windows\Temp
b) Deleted all the files from Temp folder of AppData present in path  C:\Users\MACHINE_USER_NAME\AppData\Local\Temp

Hope this might help.

Theatricals answered 15/9, 2023 at 7:53 Comment(0)
K
0

I followed these steps:

  1. close all VScode windows
  2. delete the folders under %appdata%/code/CachedData/
Kamal answered 20/12, 2023 at 18:13 Comment(0)
M
0

Check your Apps like which are getting error like chrome , vs code are put in OS or C drive.(mainly Onedrive folder contais all these apps, so check your onedrive position). after do restart.

Malinowski answered 16/3, 2024 at 9:41 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Stochmal
H
-5

It's easy than you think, you just need to update your laptop. and try to use Vs code again you will see that it works.

Hymnal answered 11/11, 2022 at 13:26 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.