Since you probably replied while I was editing my post , I ' ll add my edit here to be sure you see it edit Also the ' random ' aspect of the problem could get more attention is it really random ? If you launch the game and the same series of query , does the problem appear at different time each session ? is there anything that can ' randomly ' the rest of your program . For instance if you make use of some random function based on time going on , you could haltalter it to remove the randomness along with commenting some randomize line Same with anything going on based on the real time the goal is to have the most consistent behavior possible . You mentioned some ' server ' is that an actual online communication , or a virtual one simulated by your program ? In the first case particularly , could this server occasionnaly and randomly send some sort of wrong data ? If you can make sure nothing random should be happening and still you get random results with slightly different scenarios each time you launch the game and do the exact same thing , then there is a good chance that it ' s a bug from the gm engine .