Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Blazor Language Services causing Visual Studio to crash #15634

Closed
mrpmorris opened this issue Sep 8, 2018 · 4 comments
Closed

Blazor Language Services causing Visual Studio to crash #15634

mrpmorris opened this issue Sep 8, 2018 · 4 comments
Assignees
Labels
area-blazor Includes: Blazor, Razor Components

Comments

@mrpmorris
Copy link

When I open a Blazor project VS hangs for a while and then disappears. The next time I open it I am informed Blazor Language Services extension caused the problem.

https://www.youtube.com/watch?v=qqbAc9Kbo3M

Let me know if you need anything additional (project / logs / remote access to laptop).

Update - Output from build process

Error rzc generate exited with code 1. WebApplication22.Client C:\Users\X.nuget\packages\microsoft.aspnetcore.blazor.build\0.5.1\targets\RazorCompilation.targets 184

1>------ Rebuild All started: Project: WebApplication22.Shared, Configuration: Debug Any CPU ------
1>WebApplication22.Shared -> C:\Users\X\source\repos\WebApplication22b\WebApplication22.Shared\bin\Debug\netstandard2.0\WebApplication22.Shared.dll
2>------ Rebuild All started: Project: WebApplication22.Client, Configuration: Debug Any CPU ------
2>One or more errors occurred. (Stack empty.)
2> at System.Threading.Tasks.TaskReplicator.Run[TState](ReplicatableUserAction1 action, ParallelOptions options, Boolean stopOnFirstFailure) 2> at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally)
2>--- End of stack trace from previous location where exception was thrown ---
2> at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2> at System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException(ICollection exceptions, CancellationToken cancelToken, Exception otherException)
2> at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally) 2> at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body)
2> at Microsoft.AspNetCore.Razor.Tools.GenerateCommand.GenerateCode(RazorProjectEngine engine, SourceItem[] inputs)
2> at Microsoft.AspNetCore.Razor.Tools.GenerateCommand.ExecuteCore(RazorConfiguration configuration, String projectDirectory, String tagHelperManifest, List1 sources, List1 outputs, List`1 relativePaths)
2> at Microsoft.AspNetCore.Razor.Tools.GenerateCommand.ExecuteCoreAsync()
2> at Microsoft.AspNetCore.Razor.Tools.CommandBase.d__13.MoveNext()
2>C:\Users\X.nuget\packages\microsoft.aspnetcore.blazor.build\0.5.1\targets\RazorCompilation.targets(184,5): error : rzc generate exited with code 1.
2>Done building project "WebApplication22.Client.csproj" -- FAILED.
3>------ Rebuild All started: Project: WebApplication22.Server, Configuration: Debug Any CPU ------
3>WebApplication22.Server -> C:\Users\X\source\repos\WebApplication22b\WebApplication22.Server\bin\Debug\netcoreapp2.1\WebApplication22.Server.dll
========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ==========

@Liander
Copy link

Liander commented Sep 8, 2018

I just want to fill in to say that you can easily reproduce with cut&paste <input></input>

The input tag is a void/empty tag not accepting any children so the tag expected is <input/> but the error is not handled gracefully.

@rynowak rynowak self-assigned this Sep 11, 2018
@rynowak
Copy link
Member

rynowak commented Sep 11, 2018

I'll look into this

@rynowak
Copy link
Member

rynowak commented Sep 20, 2018

@mrpmorris - does your problem match @Liander 's description? It would be great to get an example of the file that's open when it crashes.

rynowak referenced this issue in dotnet/blazor Sep 20, 2018
We weren't correctly recovering when a void element is written as a
start-end pair. This change cleans up some of the plumbing around
end-tag handling and adds recognition for this case.

Added a new bespoke diagnostic for the void element case.
rynowak referenced this issue in dotnet/blazor Sep 21, 2018
We weren't correctly recovering when a void element is written as a
start-end pair. This change cleans up some of the plumbing around
end-tag handling and adds recognition for this case.

Added a new bespoke diagnostic for the void element case.
@rynowak
Copy link
Member

rynowak commented Sep 21, 2018

dotnet/blazor#1457 Fixed for 0.6

SteveSandersonMS referenced this issue in SteveSandersonMS/BlazorMigration Nov 27, 2018
We weren't correctly recovering when a void element is written as a
start-end pair. This change cleans up some of the plumbing around
end-tag handling and adds recognition for this case.

Added a new bespoke diagnostic for the void element case.
@mkArtakMSFT mkArtakMSFT transferred this issue from dotnet/blazor Oct 27, 2019
@mkArtakMSFT mkArtakMSFT added the area-blazor Includes: Blazor, Razor Components label Oct 27, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

No branches or pull requests

4 participants