Visual Studio Constantly Hangs and Freezes or Restarts Itself Randomly

Caleb Jacobs 106 Reputation points
2021-08-21T13:53:55.093+00:00

I am using Visual Studio 2019. I have 64 gb of ram, use 1tb NVMe drives, 12 core 4.10 GHz processor, Windows 10 OS. And even with this decent machine, Visual Studio hangs and freezes very often. I am a programmer by trade, I code at least 8 hours a day and I'd say Visual Studio locks up, stops responding around 5 times per day and randomly crashes and restarts itself around 3 times per day. The crash/restarts don't come with a hang or any warning at all. The program just completely and instantly closes itself with no warning at all. When the program freezes, in the device manager, Visual Studio will often be consuming >50% of my CPU and >33% of my RAM - which seems like a lot given my machine. I generally give the hangs about a minute to try and resolve themselves. Maybe 10% they actually resolve themselves and I can continue on. 50% of the the time, it hangs for over a minute and I have to end task in task manager. The rest of the time, it crashes after hanging for a bit. I have notices that in the rare chance that the program recovers by itself, it often feels less stable afterwards - slow to respond, much slower to think about things, delayed typing (press keys and they don't show up on screen for a few seconds, then appear all at once). Sometimes it gets like this without any hangs first. When it gets like this, I end up killing visual studio and restarting it to try and get back to a usable state.

I code unreal engine projects mostly and use the engine source so my projects are always rather large. The only plugins I use are Visual Assist and CodeMaid but the crashes/hangs happen without these plugins as well.

What can I do to make my Visual Studio more stable? These crashes and hangs are very disruptive.

P.S. the tag system on this forum is really frustrating and unintuitive to use. The user should be able to see all available tags or add their own. Or there needs to be a smarter lookup. I tried tagging this issue with 'crash' 'hang' 'unresponsive' 'visual studio' 'vs2019' and a few others and none of them were valid tags and it gives you no clue what tag it does have that might be similar. I ended up having to search for similar issues on this site to this one and see what tags they used. I had to use 'vs-general'. For your system to guess what tag you're trying to add, you have to give at least 3 characters (why? you can do better. It should guess from the very first character.) Do you see the problem? Provide 3 characters? 'vs-general'? How on earth is someone supposed to guess that the magic 3 characters they need to type in is 'vs-'? Please do better.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,620 questions
{count} votes

30 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  4. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  5. Manuel Quiroga 0 Reputation points
    2024-02-29T14:49:11.64+00:00

    Still happening for me in 2024. There seems to be a lot of issues and few fixes. Happens randomly while I'm coding and I've lost stuff I coded many times, honestly I'm hating the experience with VS right now

    0 comments No comments