Sometimes the game crashes right at the beginning as the player castles are being built. It seems to happen much more often if you "touch" the game by moving around the map, resizing, switching players, etc. And if you don't touch anything it never crashes here it seems.
looking at it with VS debugger, I think it is trying to destroy the frame during the map-levelling function when placing the castle, and results in a direct3d error. I wonder if adding a mutex, pause, catch exception, something to avoid allowing the frame to be deleted while possibly still rendering it
Sometimes the game crashes right at the beginning as the player castles are being built. It seems to happen much more often if you "touch" the game by moving around the map, resizing, switching players, etc. And if you don't touch anything it never crashes here it seems.
looking at it with VS debugger, I think it is trying to destroy the frame during the map-levelling function when placing the castle, and results in a direct3d error. I wonder if adding a mutex, pause, catch exception, something to avoid allowing the frame to be deleted while possibly still rendering it