Reputation: 381
I have tried uninstalling and reinstalling it, but the problem did not dissappear. It seems that when I open the app, more than 20 windows open at the same time, causing the app to crash. Here is a screenshot:
I've searched on the internet for what else to do, but I didn't come across any solution.
Upvotes: 15
Views: 39521
Reputation: 132
for ubuntu user's
cd ~/.config/Code/Backups/
then revert to the previous commit
code reverted to dc96b837
Upvotes: 0
Reputation: 121
I had the same issue with the May 2024 version (snap hash 89de5a8d
) on Ubuntu 22.04. None of the answers above worked for me, so I tried removing it and installing the April 2024 version (snap hash dc96b837
), this fixed the issue.
Edit: if you don't want snap to automatically update VS Code, use snap refresh --hold=720h code
, it will keep snap from updating VSC to the buggy version for 30 days. You can also use --hold=forever
if you don't want it to update at all.
Upvotes: 10
Reputation: 908
I am just reposting the answer from Chesedo's comment to be sure everyone can see it.
it is a problem with the latest release and for now, you can fix it by reverting to the last version
snap revert code
Upvotes: 44
Reputation: 396
As of 2023-Oct: I have the latest version of VS Code (System wide version and not user type version).
My VS code used to keep crashing whenever i open with a dialog prompting me to choose one among the 3 (Retry | Cancel | Keep Waiting). Mostly, first 2 attempts will crash eventually even if i click Retry/Keey Waiting. That tells me like some plugin/extension was taking time to load and until that settles down, neither action on the dialog helps me to retain but from 3rd attempt, it allowed me a sec or 2 at least to respond click on "Keep waiting". That will at least dont let the VS Code to crash itself but will stay on load.
I had the below extensions that i eventually removed and that kinda sorted out for me.
I am not saying these extensions are culprits, but my VS Code is on my work device and that goes through network/security scans and things, i felt may slow down and these are not needed for me now. Some that may try to utilize resources in syncing/network folder paths are also a factor.
I also had some tabs from OneDrive although they are having a local version, but the path is part of the OneDrive sync folder. I had to close them too.
After these are done, it's better and not crashing at all for me. Tried testing it by opening and closing it multiple times although they are slow to show up for full use.
In summary:
Upvotes: 0
Reputation: 376
I also encountered this issue and Andrew's suggestion didn't work for me, but the --disable-chromium-sandbox flag did:
code --disable-extensions --disable-gpu --disable-chromium-sandbox
Upvotes: 4
Reputation: 45
I observed that after installing the extension 'Django Template Support' the VSCode started crashing. I tried by installing the latest version of VSCode too. Still the VSCode did crash.
Once after uninstalling that extension, VSCode is working fine.
May be, we should note the change which has made the VScode to crash (though, it shouldn't, I believe.)
Upvotes: 0
Reputation: 1
I had the same issue with the latest version of VSCODE. Then i tried installing "Downloads: Windows: User" one from https://code.visualstudio.com/updates/v1_52. It worked. I am not sure of the root cause.
Upvotes: 0
Reputation: 629
I tried all the fixes above when my Ubuntu install of VS Code crashed repeatedly at startup. The only thing that worked for me was deleting the entire ~/.config/Code/Backups folder. Back it up first, just in case!
Upvotes: 4
Reputation: 381
The solution was to start VS Code from the command prompt with the following command:
code --disable-extensions --max-memory=12288mb
Then to close all open tabs and correctly exit VS Code without any open files. Hopefully this helps someone!
Upvotes: 12