Closed rcelyte closed 1 year ago
The transpiler-based patch seemed to collide with something in my mod, throwing this exception if the two were installed alongside each other:
InvalidOperationException: An attempt was made to transition a task to a final state when it had already completed. System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetResult (TResult result) (at <eae584ce26bc40229c1b1aa476bfa589>:0) (wrapper dynamic-method) MultiplayerStatusModel+<GetMultiplayerStatusAsyncInternal>d__9.DMD<MultiplayerStatusModel+<GetMultiplayerStatusAsyncInternal>d__9::MoveNext>(MultiplayerStatusModel/<GetMultiplayerStatusAsyncInternal>d__9&) System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.InvokeMoveNext (System.Object stateMachine) (at <eae584ce26bc40229c1b1aa476bfa589>:0) System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <eae584ce26bc40229c1b1aa476bfa589>:0) System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <eae584ce26bc40229c1b1aa476bfa589>:0) System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () (at <eae584ce26bc40229c1b1aa476bfa589>:0) System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation+<>c.<.cctor>b__7_0 (System.Object state) (at <eae584ce26bc40229c1b1aa476bfa589>:0) UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <451019b49f1347529b43a32c5de769af>:0) UnityEngine.UnitySynchronizationContext:ExecuteTasks()
Upon further investigation, I believe this exception is the result of a bug in HarmonyX. I'll go open an issue there.
The transpiler-based patch seemed to collide with something in my mod, throwing this exception if the two were installed alongside each other: