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,515 questions
{count} votes

30 answers

Sort by: Most helpful
  1. Tom Zee 21 Reputation points
    2021-10-12T10:59:35.887+00:00

    I'm getting a similar issue, just the hanging though, it will throw a (Not Responding) and go white and never recovers, this happens more often if I try to do things to quickly after loading a project whilst background work is finishing.

    4 people found this answer helpful.

  2. PengGe-MSFT 3,321 Reputation points
    2021-08-23T02:30:05.627+00:00

    Hi, @Caleb Jacobs

    Welcome to Microsoft Q&A!

    I cannot reproduce your issue on my side.

    You can try to repair Visual Studio, if the problem persists, I suggest you report this issue to Visual Studio Product Team in our Developer Community, and if you do suggest this feature, please share the link here, other forum members, who are interested or needed this feature will go to vote for this thread.

    Sincerely,
    Peng
    *
    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread


  3. Tam Nguyen 21 Reputation points
    2021-10-20T16:34:59.773+00:00

    Other developers on our team have been crashing since March with the latest updates. I downgraded to VS 2019 16.7.2 and the crashes have gone away.

    0 comments No comments

  4. Verret, Carl 1 Reputation point
    2021-11-12T13:14:35.8+00:00

    having same issue since a couple of weeks. Happens many times day. Loosing a lot of time restarting vs and sometimes need to reboot. V16.11.6 on Win10 16Gb Ram

    0 comments No comments

  5. mm ss 6 Reputation points
    2021-11-28T05:14:36.997+00:00

    I have the same issue, but normally it's going good after showing not responding.Except in .Net core windows form app. In dotnet core windows forms app it crashes all of the time and don't get stable.please help me.