lichen8566
Warlord
I had a save where ending a turn and loading the save again was reliably crashing the game. The debugger told exactly that it is a heap corruption, then all I did was googling on how to use the appverifier/gflags tool to trace bugs like this down. These are really ugly ones, as the CTD used to happen very far from the faulty code. The tools place a protected area before or after the allocated memory, so when the bug tries to overwrite these, it is causing an immediate fault so you can catch it. Typically these are the errors which make the debug work, but crash the release (a harmless overwrite may become deadly within the more compact release version).
Thank you, I see, that tool actually allocates a bigger memory space than requested, and adds tags before and after, just like what most of memory manager does.
So, after you check the code by GF, you had not find any more memory overwirte bugs, had you?