ilya-chumakov / LoggingAdvanced

Improved and patched .NET Core console logger.
Apache License 2.0
22 stars 4 forks source link

NullReferenceException in ConsoleLogScope.DisposableScope.Dispose #8

Open NArnott opened 5 years ago

NArnott commented 5 years ago

I've used this logger in lots of applications, and had great success. However, it crashes occasionally when used with the Azure SignalR client (see stack trace below). Once it crashes once, it does so repeatedly. (several thousands crashes logs in an hour's time).

This is running in a AspNetCore 2.2.0 application. I'm currently using LoggingAdvanced version 0.4.0.

I originally opened a ticket with Microsoft's SignalR team, and after a couple months of back and forth, they said it wasn't their bug... so can you review and see if this is an issue on your end?

SignalR: https://www.nuget.org/packages/Microsoft.Azure.SignalR/1.0.9

System.NullReferenceException: Object reference not set to an instance of an object. at LoggingAdvanced.Console.ConsoleLogScope.DisposableScope.Dispose() at Microsoft.Extensions.Logging.Logger.Scope.Dispose() at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.DisposeAsyncCore() at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.DisposeAsync() at Microsoft.Azure.SignalR.ServiceConnectionBase.ProcessIncomingAsync() at Microsoft.Azure.SignalR.ServiceConnectionBase.StartAsync(String target)

ilya-chumakov commented 5 years ago

@NArnott, thanks for reaching out. I'd like to review this issue, but don't have a possibility in the next 2 weeks (I'm leaving on a mountain trip). Could you provide a minimal reproducible sample for this bug so I could look at it after return?