mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
After a "stop" do not read new input until search finishes
Unfortunatly xboard sends immediately the new position to search after sending "stop" when we have a ponder miss. Becuase main thread position is not copied but is referenced directly from root position and the latter is modified by the "position.." UCI command we end up with the working position that changes under our feet while the search is still recovering after the "stop" and this causes a crash. This happens only with the (broken) xboard, native UCI does not have this problem. Reported by otello1984 No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -72,6 +72,7 @@ void uci_loop() {
|
||||
quit = (token == "quit");
|
||||
Search::Signals.stop = true;
|
||||
Threads[0].wake_up(); // In case is waiting for stop or ponderhit
|
||||
Threads.wait_end_of_search(); // Block here until search finishes
|
||||
}
|
||||
|
||||
else if (cmd == "ponderhit")
|
||||
|
||||
Reference in New Issue
Block a user