dotnet / razor

Compiler and tooling experience for Razor ASP.NET Core apps in Visual Studio, Visual Studio for Mac, and VS Code.
https://asp.net
MIT License
505 stars 195 forks source link

Visual Studio 2019 crashes often when editing a blazor project #5002

Closed vsfeedback closed 3 years ago

vsfeedback commented 3 years ago

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work]

Running VS 2019 16.8.2

I have a Blazor solution (.net core 3.1) with 3 projects in it (2x class, 1 x console app).

After running the project once or twice, visual studio will crash when editing files. These crashes happen about 4-5 times per day.

When it crashes, typically, I am editing a .cs file (not a .razor file), and while I am typing, the response will slow down. So for example I will type 'protected' but nothing shows on the screen for 4-5 seconds. Then 'protected' appears. Next I will type 'void' and nothing shows up on the screen for 10-15 s. Then 'void' shows up. Then I type somemore, but nothing shows up for about 30s, and then VS crashes.

My system is as as follows:

When VS crashes, the following processes will be consuming 2-3 GB each:

Attached is the crash dump.


Original Comments

Feedback Bot on 11/24/2020, 07:28 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Dr. Tim dos Santos on 11/27/2020, 00:27 AM:

I can reproduce this. There was a big performance / memory problem in VS 2019 16.6, that was fixed in one of the latest 16.7 versions; this seems now to have regressed into 16.8.

Symptom is: devenv.exe and roslyn code analyzer exe taking gigabytes of memory, causing severe slowdowns, and then VS crashes due to OutOfMemoryExceptions.


Original Solutions

(no solutions)

NTaylorMullen commented 3 years ago

Also associated: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1250511

josephsctan commented 3 years ago

Are there any workarounds that will prevent this from happening? VS is crashing around 10 times a day for me, when working on a blazor project. If switching things off will help, I would be keen to try.
I did try disabling Intellisense, but that doesn't help.

image

NTaylorMullen commented 3 years ago

@josephsctan that's awful! I'm sincerely sorry that you're encountering that. Have you found anything that reliably reproduces the issue so we can investigate further?

If you're willing to be a guinea pig for a bit we've been putting in a lot of effort to building out a new Razor/Blazor editor which is currently available in the form of a preview feature (Tools -> Options -> Environment -> Preview Features):

image

Give it a shot and let us know if you hit any issues, we're actively trying to improve the Blazor tooling experience!

josephsctan commented 3 years ago

@josephsctan that's awful! I'm sincerely sorry that you're encountering that. Have you found anything that reliably reproduces the issue so we can investigate further?

My current project crashes about 10 times a day. Its pretty (un) reliable ! I've submitted crash dumps when I reported the issue. What else can I send you?

If you're willing to be a guinea pig for a bit we've been putting in a lot of effort to building out a new Razor/Blazor editor which is currently available in the form of a preview feature (Tools -> Options -> Environment -> Preview Features): Give it a shot and let us know if you hit any issues, we're actively trying to improve the Blazor tooling experience!

Will do.

NTaylorMullen commented 3 years ago

I've submitted crash dumps when I reported the issue. What else can I send you?

Ah, so this issue is associated with your crash. That should be sufficient 😄

josephsctan commented 3 years ago

Some notes when using the new razor editor: