File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Chess-Challenge/src/Framework/Application/Core Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -236,7 +236,22 @@ void OnMoveChosen(Move chosenMove)
236236 playMoveTime = lastMoveMadeTime + MinMoveDelay ;
237237 if ( PlayerToMove . Bot is MyBot )
238238 {
239- maxMemoryUsed = Math . Max ( ObjectSizeHelper . GetSize ( PlayerToMove . Bot ) , maxMemoryUsed ) ;
239+ 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+ }
240255 }
241256 }
242257 else
You can’t perform that action at this time.
0 commit comments