user15571: I have created a GUI that communicates with a Stockfish 8 engine by passing it a FEN string. Everything works nice but on some specific FEN strings, Stockfish crashes. I don't have any clue why...
One of the FEN strings on which Stockfish crashes is
r2k1b1r/pp4p1/4QnPp/3p1B1P/2pPp3/3qP2N/5PKR/3nB3 b KQkq - 0 1


user825: Very simple, your FEN is absolutely invalid. You shouldn't give castling rights in a position that you kings have already moved. This won't work.

15571: <p>I have created a GUI that communicates with a Stockfish 8 engine by passing it a FEN string. Everything works nice but on some specific FEN strings, Stockfish crashes. I don't have any clue why...</p>

<p>One of the FEN strings on which Stockfish crashes is</p>

<pre><code>r2k1b1r/pp4p1/4QnPp/3p1B1P/2pPp3/3qP2N/5PKR/3nB3 b KQkq - 0 1
</code></pre>
 825: <p>Very simple, your FEN is absolutely invalid. You shouldn't give castling rights in a position that you kings have already moved. This won't work.</p>
