You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Threading.Tasks.Task.AddTaskContinuationComplex(Object tc, Boolean addBeforeOthers)
at System.Threading.Tasks.Task.AddTaskContinuation(Object tc, Boolean addBeforeOthers)
at System.Threading.Tasks.Task.UnsafeSetContinuationForAwait(IAsyncStateMachineBox stateMachineBox, Boolean continueOnCapturedContext)
at System.Runtime.CompilerServices.TaskAwaiter.UnsafeOnCompletedInternal(Task task, IAsyncStateMachineBox stateMachineBox, Boolean continueOnCapturedContext)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AwaitUnsafeOnCompleted[TAwaiter](TAwaiter& awaiter, IAsyncStateMachineBox box)
at Program.<Main>$(String[] args) in C:\Repos\experiments\configureawait-fody-nre-bug-repro\Program.cs:line 3
at Program.<Main>(String[] args)
Describe the issue
The following code throws a
NullReferenceException
when processed by ConfigureAwait.Fody.It finishes successfully when the weaver is disabled.
It does not throw when I save the Task to a local variable and
await
in a separate statementTypical stack trace:
I'm running:
Minimal Repro
Can be found here: https://github.com/Storm-BE/configureawait-fody-nre-bug-repro
Make an effort to fix the bug
If I find some time I hope to have a look at this myself
The text was updated successfully, but these errors were encountered: