-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stockfish 15.1 crashes for: position fen 3qk1nb/1p3p2/p1r1p1p1/3p4/3P4/2N1BP2/PPPQ1P2/R3K3 w Qk - 0 15 #5071
Comments
Your fen isn't a valid FEN. |
Thank you, this is a good pointer! Why is Stockfish then accepting the following fen: |
Probably because the king is in check and chess rules say we cant castle, so we dont try to generate the move and after the king moves we clear all castling squares for the king. |
How the engine reacts to illegal fens should be considered undefined behaviour, you can't rely on the engine consistently saving itself from a crash. |
Ok, thank you very much for the super fast response! I fully agree, the error is with the generation of the fens that I am using (not your problem). For future reference below all the previous fens from that game that I am using were also faulty but did not result in an error. But again, not your issue as PGG106 is pointing out (but maybe interesting for someone else at some point).
Feel free to mark the issue as closed |
Describe the issue
I am using stockfish_15.1_win_x64 from the official website. When running stockfish-windows-2022-x86-64.exe and prompting the commands:
The exe crashes instantaneously. Similarly, my flutter app running with a flutter implementation of Stockfish 15.1 (https://pub.dev/packages/stockfish) crashes with an error pointing to the engine.
Other positions run through as expected.
Expected behavior
Stockfish calculates position and does not crash
Steps to reproduce
See above
Anything else?
No response
Operating system
All
Stockfish version
Stockfish 15.1
The text was updated successfully, but these errors were encountered: