Closed jthorpe80 closed 9 months ago
Hmm, that code is pretty hardened... https://github.com/aspnet/AspNetKatana/blob/3c194663090eeea35e5ee95cbe54959e0b90e3e3/src/Microsoft.Owin.Host.SystemWeb/CallHeaders/SendingHeadersEvent.cs#L10-L37
Could somebody be calling OnSendingHeaders with a null Action callback? https://github.com/aspnet/AspNetKatana/blob/3c194663090eeea35e5ee95cbe54959e0b90e3e3/src/Microsoft.Owin.Host.SystemWeb/CallHeaders/SendingHeadersEvent.cs#L34C2-L34C2
I'm not sure. This started after some Nuget packages were added. Is there a way to trace it back to the offending caller? Also, shouldn't line 26 also contain a check for a null action callback?
A null check or conditional break point on line 20 would be the quickest way to identify the problematic caller. Want to submit a PR?
I know nothing of this OWIN codebase and am not really qualified to do a PR. Are you saying a PR is the only way the issue would be fixed, or it would be a nice to have?
Thank you. Is there a release date for 4.2.3?
Not yet. There should be nightly builds you can test though to see if this fixes it.
I don't think that is possible. I've never been able to reproduce. I only see the error in production.
Are you willing to deploy the nightly builds into production? It's the same bits other than the version number.
It would be a tough sell. This is a government system with the usual red tape.
We occasionally see this exception, more so during heavier traffic. Never been able to reproduce during testing. Using latest Microsoft.Owin nuget packages (4.2.2)
System.InvalidOperationException ---> System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Owin.Host.SystemWeb.CallHeaders.SendingHeadersEvent.Fire() in at Microsoft.Owin.Host.SystemWeb.OwinCallContext.StartOnce() in --- End of inner exception stack trace --- at Microsoft.Owin.Host.SystemWeb.OwinCallContext.OnStart() in at Microsoft.Owin.Host.SystemWeb.OwinCallContext.OnEnd() in --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Owin.Host.SystemWeb.CallContextAsyncResult.End(IAsyncResult result) in at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.d__12.MoveNext() in
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End(IAsyncResult ar) in
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)