1 parent 9bd8517 commit a7c68ffCopy full SHA for a7c68ff
1 file changed
Chess-Challenge/src/Framework/Application/Core/ChallengeController.cs
@@ -236,7 +236,22 @@ void OnMoveChosen(Move chosenMove)
236
playMoveTime = lastMoveMadeTime + MinMoveDelay;
237
if (PlayerToMove.Bot is MyBot)
238
{
239
- maxMemoryUsed = Math.Max(ObjectSizeHelper.GetSize(PlayerToMove.Bot), maxMemoryUsed);
+ isPlaying = false;
240
+ try
241
+ {
242
+ maxMemoryUsed = Math.Max(ObjectSizeHelper.GetSize(PlayerToMove.Bot), maxMemoryUsed);
243
+ }
244
+ catch (Exception e)
245
246
+ Log("An error occurred while determining used memory size.\n" + e.ToString(), true,
247
+ ConsoleColor.Red);
248
+ hasBotTaskException = true;
249
+ botExInfo = ExceptionDispatchInfo.Capture(e);
250
251
+ finally
252
253
+ isPlaying = true;
254
255
}
256
257
else
0 commit comments