dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.99k stars 4.03k forks source link

MessagePackSerializationException: Failed to serialize System.IO.Pipelines.PipeWriter value. #56613

Open tmat opened 3 years ago

tmat commented 3 years ago

Microsoft Visual Studio Enterprise 2022 Int Preview (64-bit) Version 17.0.0 Preview 5.0 [31717.387.main]

StreamJsonRpc.RemoteInvocationException: Error writing JSON RPC Message: MessagePackSerializationException: Failed to serialize System.IO.Pipelines.PipeWriter value.
   at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__139`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.<TryInvokeAsync>d__21.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
RPC server exception:
MessagePack.MessagePackSerializationException: Error writing JSON RPC Message: MessagePackSerializationException: Failed to serialize System.IO.Pipelines.PipeWriter value.
 ---> MessagePack.MessagePackSerializationException: Failed to serialize System.IO.Pipelines.PipeWriter value.
 ---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Nerdbank.Streams.MultiplexingStream'.
      at Microsoft.Verify.NotDisposed(IDisposableObservable disposedValue, String message)
      at Nerdbank.Streams.MultiplexingStream.CreateChannel(ChannelOptions options)
      at StreamJsonRpc.Reflection.MessageFormatterDuplexPipeTracker.GetULongToken(IDuplexPipe duplexPipe)
      at StreamJsonRpc.MessagePackFormatter.PipeFormatterResolver.PipeWriterFormatter`1.Serialize(MessagePackWriter& writer, T value, MessagePackSerializerOptions options)
      at MessagePack.MessagePackSerializer.Serialize[T](MessagePackWriter& writer, T value, MessagePackSerializerOptions options)
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
   --- End of inner exception stack trace ---
      at MessagePack.MessagePackSerializer.Serialize[T](MessagePackWriter& writer, T value, MessagePackSerializerOptions options)
      at StreamJsonRpc.MessagePackFormatter.JsonRpcRequestFormatter.Serialize(MessagePackWriter& writer, JsonRpcRequest value, MessagePackSerializerOptions options)
      at StreamJsonRpc.MessagePackFormatter.JsonRpcMessageFormatter.Serialize(MessagePackWriter& writer, JsonRpcMessage value, MessagePackSerializerOptions options)
      at StreamJsonRpc.MessagePackFormatter.Serialize(IBufferWriter`1 contentBuffer, JsonRpcMessage message)
   --- End of inner exception stack trace ---
      at StreamJsonRpc.MessagePackFormatter.Serialize(IBufferWriter`1 contentBuffer, JsonRpcMessage message)
      at StreamJsonRpc.LengthHeaderMessageHandler.Write(JsonRpcMessage content, CancellationToken cancellationToken)
      at StreamJsonRpc.PipeMessageHandler.WriteCoreAsync(JsonRpcMessage content, CancellationToken cancellationToken)
      at StreamJsonRpc.MessageHandlerBase.<WriteAsync>d__23.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at StreamJsonRpc.JsonRpc.<TransmitAsync>d__163.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__149.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__139`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.<>c__DisplayClass26_0`1.<<InvokeStreamingServiceAsync>b__0>d.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.<>c__DisplayClass26_0`1.<<InvokeStreamingServiceAsync>b__0>d.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.IO.Pipelines.PipeCompletion.ThrowLatchedException()
      at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)
      at System.IO.Pipelines.Pipe.GetReadAsyncResult()
      at System.IO.Pipelines.PipeReader.<CopyToAsyncCore>d__13`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.<InvokeStreamingServiceAsync>d__26`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at System.Threading.Tasks.ValueTask`1.get_Result()
      at Microsoft.CodeAnalysis.Remote.RemoteCallback`1.<InvokeAsync>d__4`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.CodeAnalysis.Remote.SolutionAssetSource.<GetAssetsAsync>d__2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.CodeAnalysis.Remote.AssetProvider.<RequestAssetsAsync>d__12.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.CodeAnalysis.Remote.AssetProvider.<RequestAssetAsync>d__11.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.CodeAnalysis.Remote.AssetProvider.<GetAssetAsync>d__5`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.SolutionCreator.<IsIncrementalUpdateAsync>d__5.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.<<GetProjectSubsetSolutionAsync>g__GetProjectSubsetSolutionSlowAsync|15_0>d.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.CodeAnalysis.Remote.RemoteNavigateToSearchService.<>c__DisplayClass6_0.<<SearchFullyLoadedProjectAsync>b__0>d.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.CodeAnalysis.Remote.BrokeredServiceBase.<RunServiceImplAsync>d__15.MoveNext()
dotnet-issue-labeler[bot] commented 3 years ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.