Closed zuev93 closed 5 months ago
This change removed the TryGetKey check in MultiplayerObjects.Get, and now a failed dictionary lookup will result in a KeyNotFoundException. Here's the stack:
KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary2[TKey,TValue].get_Item (TKey key) [0x0001e] in <695d1cc93cca45069c528c15c9fdd749>:0 at MultiplayerMod.Core.Collections.BidirectionalMap
2[TKey,TValue].get_Item (TValue key) [0x00000] in <70756a7e22354ab2ba8f3eebfc9a79b2>:0
at MultiplayerMod.Multiplayer.Objects.MultiplayerObjects.Get[T] (MultiplayerMod.Multiplayer.Objects.MultiplayerId id) [0x00000] in <70756a7e22354ab2ba8f3eebfc9a79b2>:0
at MultiplayerMod.Multiplayer.Commands.Chores.States.AllowStateTransition.Execute (MultiplayerMod.Multiplayer.Commands.MultiplayerCommandContext context) [0x00055] in <70756a7e22354ab2ba8f3eebfc9a79b2>:0
at MultiplayerMod.Multiplayer.CoreOperations.CommandExecution.MultiplayerCommandExecutor.RunCatching (MultiplayerMod.Network.IMultiplayerClientId clientId, MultiplayerMod.Multiplayer.Commands.IMultiplayerCommand command) [0x00036] in <70756a7e22354ab2ba8f3eebfc9a79b2>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <695d1cc93cca45069c528c15c9fdd749>:0
at MultiplayerMod.Multiplayer.CoreOperations.CommandExecution.CommandExceptionHandler.Handle (MultiplayerMod.Multiplayer.Commands.IMultiplayerCommand command, System.Exception exception) [0x00036] in <70756a7e22354ab2ba8f3eebfc9a79b2>:0
at MultiplayerMod.Multiplayer.CoreOperations.CommandExecution.MultiplayerCommandExecutor.RunCatching (MultiplayerMod.Network.IMultiplayerClientId clientId, MultiplayerMod.Multiplayer.Commands.IMultiplayerCommand command) [0x0003e] in <70756a7e22354ab2ba8f3eebfc9a79b2>:0
at MultiplayerMod.Multiplayer.CoreOperations.CommandExecution.MultiplayerCommandExecutor+<>c__DisplayClass6_0.
The issue was caused by 0 amount and underlying assert in the constructor of FetchOrder.