Skip to content

System.NullReferenceException throw in v1.37.12 to v1.37.16 when access /checkreadystatus endpoint #2259

@xiguichen

Description

@xiguichen

Roslyn currently have problem when access /checkreadystatus endpoint, following exception will be throw

System.NullReferenceException
HResult=0x80004003
Source=Microsoft.AspNetCore.Server.Kestrel.Core
StackTrace:
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.CreateResponseHeader(Boolean appCompleted)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.InitializeResponseAsync(Int32 firstWriteByteCount)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.WriteAsync(ReadOnlyMemory`1 data, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseStream.WriteAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.Dispose(Boolean disposing)
at System.IO.TextWriter.Dispose()
at OmniSharp.Http.Middleware.MiddlewareExtensions.WriteJson(HttpResponse response, Object value) in C:\Users\xiguic\develop\omnisharp-roslyn\src\OmniSharp.Http\Middleware\MiddlewareExtensions.cs:line 20

This exception was originally thrown at this call stack:
[External Code]
OmniSharp.Http.Middleware.MiddlewareExtensions.WriteJson(Microsoft.AspNetCore.Http.HttpResponse, object) in MiddlewareExtensions.cs

The problem was first introduced in v1.37.12.

Can someone help to fix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions