
Expected: Normal editing
Actual: RZLS seems to have crashed
Note; repro doesn't happen 100% of the time.
System.InvalidOperationException: The language server has not yet shutdown.at Roslyn.Utilities.Contract.Fail(String message)at
Microsoft.VisualStudio.LanguageServices.Implementation.LanguageClient.AbstractInProcLanguageClient.ActivateAsync(CancellationToken token)at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.<InitializeAsync>d__83.MoveNext() --- End of stack trace from previous location where exception was thrown --- at
Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.<InitializeAsync>d__83.MoveNext() --- End of stack trace from previous location where exception was thrown --- at
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)at
Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.<OnRpcDisconnected>d__92.MoveNext() --- End of stack trace from previous location where exception was thrown --- at
Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
[VS Main Local]
[30713.9]
@dibarbet transferring this to Roslyn. There's a good chance this is an LSP platform issue but I don't see why they would be trying to re-activate either so I'm slightly suspect of Roslyn's pre-loading behavior.
@NTaylorMullen this is a dupe of https://github.com/dotnet/roslyn/issues/49329
Nevermind, @davidwengier is correct and this is not a dupe - my bad!
The LSP logs here will be useful - it looks we shutdown (either we get called to shutdown or we get a change we can't apply), then the client attempts to restart before we fully shutdown
ActivityLog
System.InvalidOperationException: The language server has not yet shutdown.at Roslyn.Utilities.Contract.Fail(String message)at
Microsoft.VisualStudio.LanguageServices.Implementation.LanguageClient.AbstractInProcLanguageClient.ActivateAsync(CancellationToken token)at
Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.<InitializeAsync>d__83.MoveNext() --- End of stack trace from previous location where exception was thrown --- at
Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.<InitializeAsync>d__83.MoveNext() --- End of stack trace from previous location where exception was thrown --- at
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)at
Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.<OnRpcDisconnected>d__92.MoveNext() --- End of stack trace from previous location where exception was thrown --- at
Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
Razor C# Language Server Client
Sent you the LSP logs.
https://github.com/dotnet/roslyn/issues/49528 causes the yellow bar.
The root cause of the shutdown is we're getting asked about non-generated-razor documents in an LSP server that only knows about generated razordocuments. This is supposed to be handled via client name we set on our server - the LSP client should only be asking our server about buffers that have a matching client.
Most helpful comment
@NTaylorMullen this is a dupe of https://github.com/dotnet/roslyn/issues/49329