Game crashes to desktop
Moderators: Slitherine Core, The Lordz
Game crashes to desktop
I was able to get through a campaign as the Allies by rebooting my PC every few turns after turn 12 when the game would crash to desktop during the AI turn. I am now playing the Central Powers and am at turn 18, and the game crashes to desktop during the AI turn. I have not been able to get any further despite rebooting the PC (many times). I have the Steam version patched to 1.6.6. What do I need to do to get the game to run?
I have a fairly modern Windows 11 PC with 32 GB of RAM. All the drivers are up to date.
I have a fairly modern Windows 11 PC with 32 GB of RAM. All the drivers are up to date.
Re: Game crashes to desktop
Is this a bug from the official release of the game version 1.6.6 without any cheat-tools or mods installed?
Click on the "credits" button on the title screen to see the version number at the bottom-right.
I can probably help you if you can provide the last autosave from the turn before the crash happens.
The autosave file is named AutoSaveEndTurn.ctgw and can be found in the following folder
"My Documents\My Games\Commander The Great War\Save"
Put that autosave into a .zip or .rar archive and attach it to your next reply using the forum's "upload attachment" feature.
You can find the upload button in the bottom left corner of the reply box after you click on "full editor and preview".

Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610
Re: Game crashes to desktop
Autosave zip file attached. I don't have any mods or other tools installed. Game is vanilla 1.6.6. Thank you for your help.
I am enjoying the game a lot and really want to get it to work.
I am enjoying the game a lot and really want to get it to work.
- Attachments
-
AutoSaveEndTurn.zip
- (146.77 KiB) Downloaded 4 times
Re: Game crashes to desktop
I tried a dozen times to reproduce your crash but each time the game continued to the next turn without problems (see turn number on screenshot).
Let's have a look at the logfile then. Immediately after the crash happened go to:
"My Documents\My Games\Commander The Great War
where you will find a file named ctgw.log. Make a copy of that file and attach it as a zip/rar archive to your next reply.
Do not reload the game before you have made a copy of the logfile immediately after the crash, it will be overwritten if you launch the game again.
Let's have a look at the logfile then. Immediately after the crash happened go to:
"My Documents\My Games\Commander The Great War
where you will find a file named ctgw.log. Make a copy of that file and attach it as a zip/rar archive to your next reply.
Do not reload the game before you have made a copy of the logfile immediately after the crash, it will be overwritten if you launch the game again.

Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610
Re: Game crashes to desktop
Sorry for the double post, but I re-ran turn 18, and the log file is different and potentially more interesting. ctgw-newer is the new log file.
- Attachments
-
ctgw-newer.zip
- (549 Bytes) Downloaded 9 times
Re: Game crashes to desktop
Unfortunately neither logfile contained any hint about what might have caused the crash.
I've attached a test.zip archive containing a modified version of one of the scripts that will not fix the issue but might help us to find out at which specific point the crash is triggered.
The file is named game.lua and goes into the following folder:
Commander the Great War\Data\Scripts
There should already be a game.lua file there, overwrite it with game.lua from the archive.
After the crash open the ctgw.log and post the content.
Since I was able to continue the game to the next turn I've also attached the savegame from the start of turn 19. If the crash is caused by something that only happens at the start of specific turns you might be able to continue. No need to move any units, just end the turn.
I've attached a test.zip archive containing a modified version of one of the scripts that will not fix the issue but might help us to find out at which specific point the crash is triggered.
The file is named game.lua and goes into the following folder:
Commander the Great War\Data\Scripts
There should already be a game.lua file there, overwrite it with game.lua from the archive.
After the crash open the ctgw.log and post the content.
Since I was able to continue the game to the next turn I've also attached the savegame from the start of turn 19. If the crash is caused by something that only happens at the start of specific turns you might be able to continue. No need to move any units, just end the turn.
- Attachments
-
turn 19.zip
- (130.28 KiB) Downloaded 7 times
-
test.zip
- (3.37 KiB) Downloaded 19 times

Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610
Re: Game crashes to desktop
This is the log file using the game.lua file you provided.
- Attachments
-
ctgw.zip
- (555 Bytes) Downloaded 5 times
Re: Game crashes to desktop
Okay, that means the crash is triggered by the ingame function that controls the change from winter to summer which also involves changing the map graphics.
That's weird because apparently the game started okay with the summer map at the beginning of the campaign and also correctly loads the winter map on turn 14 but then crashes when loading back the summer map on turn 19.
Please go to the following folder:
Commander the Great War/Data/Graphics/maps
There should be two large (90+ MB) PNG graphics: Map.png (90,2 mb) and map_winter.png (92,1 mb) and four small graphics.
Do the sizes match your installation?
I don't run Win11 but a quick google search shows that there have been issues with large PNG files on Win11?
Try to open Map.png and map_winter.png in some picture viewers. Any problems?
That's weird because apparently the game started okay with the summer map at the beginning of the campaign and also correctly loads the winter map on turn 14 but then crashes when loading back the summer map on turn 19.
Please go to the following folder:
Commander the Great War/Data/Graphics/maps
There should be two large (90+ MB) PNG graphics: Map.png (90,2 mb) and map_winter.png (92,1 mb) and four small graphics.
Do the sizes match your installation?
I don't run Win11 but a quick google search shows that there have been issues with large PNG files on Win11?
Try to open Map.png and map_winter.png in some picture viewers. Any problems?

Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610
Re: Game crashes to desktop
I am able to open Map.png and map_winter.png in pictures views and Powerpoint. The sizes of the files I have match your files.
Perhaps this is important: I only have five (5) files in Data/Graphics/maps. I do not have the frame_.png file.
Perhaps this is important: I only have five (5) files in Data/Graphics/maps. I do not have the frame_.png file.
Re: Game crashes to desktop
Here you go.
- Attachments
-
frame_.zip
- (2.06 KiB) Downloaded 9 times

Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610
Re: Game crashes to desktop
Unfortunately, putting frame_.png in the Data/Graphics/maps folder did not work. The game still crashes at the same point - after Check 1 but before Check 2 - per the log file.
- Attachments
-
ctgw.zip
- (555 Bytes) Downloaded 8 times
Re: Game crashes to desktop
I think I can confirm that the ChangeClimate() line in the game.lua file is the problem. I commented out this line, and I was able to complete turn 18 without a crash.
Presumably ChangeClimate is important to the functioning of the game so leaving this function call out of the lua file will cause problems at some point.
Presumably ChangeClimate is important to the functioning of the game so leaving this function call out of the lua file will cause problems at some point.
Re: Game crashes to desktop
Commenting out ChangeClimate() means that the campaign you're currently playing will remain in permanent winter mode. Not only the winter map will remain but also the negative modifiers to unit efficiency when moving or fighting and negative attack modifiers while fighting. This will make the game much more difficult for the attacking side.
What happens if you just comment out line 290 which executes the actual reload of the map?
Should this work it will only leave you with the permanent winter map but without negative modifiers.
You could also comment out the whole function just like you did and then start a new campaign and then you would remain in permanent summer mode which would make the game about 25% easier.
Better still would be to just comment out line 290 (assuming this actually works for you) and then start a new campaign on permanent summer map but keeping the winter modifiers during December until February each year.
Still puzzling why reloading the summer map causes a problem at all.
What happens if you just comment out line 290 which executes the actual reload of the map?
Code: Select all
GetPlayer().scene:LoadMap("map")
You could also comment out the whole function just like you did and then start a new campaign and then you would remain in permanent summer mode which would make the game about 25% easier.
Better still would be to just comment out line 290 (assuming this actually works for you) and then start a new campaign on permanent summer map but keeping the winter modifiers during December until February each year.
Still puzzling why reloading the summer map causes a problem at all.


Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610
Re: Game crashes to desktop
Thank you so much for all your help! I was able to flawlessly play the game all the way through and defeated the Allies by October 1917 in, apparently, the 1916/17 Ice Age. I will try commenting out line 290 of the game.lua for my next play through.
The game is super fun ... once you don't have to deal with the frustration of being stuck at turn 18. I will try Potzbiltz next. Someone in the Steam comment section is stuck just like I was. I will direct him/her to this thread. I will also update my negative review on Steam.
The game is super fun ... once you don't have to deal with the frustration of being stuck at turn 18. I will try Potzbiltz next. Someone in the Steam comment section is stuck just like I was. I will direct him/her to this thread. I will also update my negative review on Steam.
Re: Game crashes to desktop
Great to hear that and thanks for spreading the word on Steam.
Considering Potzblitz I should "warn" you that the mod was made for experienced players and is way more difficult than the basic game.
And just to make sure we didn't miss a very simple cause for the crash issue: have you also tried running the game in windowed mode?
Considering Potzblitz I should "warn" you that the mod was made for experienced players and is way more difficult than the basic game.

And just to make sure we didn't miss a very simple cause for the crash issue: have you also tried running the game in windowed mode?

Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610
Re: Game crashes to desktop
A few more things:
• Commenting out line 290 of the game.lua file did not work. The game still crashed to desktop when the season changed.
• I tried running the game in windowed mode in the past and the game still crashed.
Commenting out ChangeClimate() is the only way I've been able to play past the change of season.
I am looking forward to the challenge of Potzbiltz. The vanilla game is fun, but I've won from both sides before the end of 1915. The AI is too focused on Serbia as the Central Powers, and it is too easy to interdict convoys from either alliance. Without convoys, either alliance collapses very quickly.
• Commenting out line 290 of the game.lua file did not work. The game still crashed to desktop when the season changed.
• I tried running the game in windowed mode in the past and the game still crashed.
Commenting out ChangeClimate() is the only way I've been able to play past the change of season.
I am looking forward to the challenge of Potzbiltz. The vanilla game is fun, but I've won from both sides before the end of 1915. The AI is too focused on Serbia as the Central Powers, and it is too easy to interdict convoys from either alliance. Without convoys, either alliance collapses very quickly.
Re: Game crashes to desktop
When? From turn 18 to 19 or later in the game?
Since commenting out ChangeClimate() allows you to continue the game we need to find out exactly which line of the function actually causes the crash by trial & error.
Comment out line 291 and 292 too and try again from the turn 18 savegame.
Code: Select all
-- GetPlayer().scene:LoadMap("map")
-- gameplay.winter = 0
-- AddToReportQueue(playerAlliance, "report_summer", "icon_winter")
What is your desktop resolution anyway? If it's greater than 1920 x 1080 have you tried reducing it to 1920 x 1080?

Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610
Re: Game crashes to desktop
Playing Potzblitz the game still crashed editing out the lines shown in your previous post (even though the line numbers are different). I was able to finish the game by commenting out ChangeClimate().
I am playing at 1920x1080 resolution.
Note: By exiting and restarting the game every few turns around the time of the weather changes, the map would change as well as give the weather effects. Slightly inconvenient, but not bad.
Commenting out ChangeClimate() from game.lua has been the best solution to prevent the game crashing.
I am playing at 1920x1080 resolution.
Note: By exiting and restarting the game every few turns around the time of the weather changes, the map would change as well as give the weather effects. Slightly inconvenient, but not bad.
Commenting out ChangeClimate() from game.lua has been the best solution to prevent the game crashing.
Re: Game crashes to desktop
One last thought: do you have the following graphic icon_winter.png in
Commander the Great War/Data/Graphics/hud
If you do, then now I'm clueless and quite frankly I do give up.
Since you're the first user at all who reported that specific crash issue in about 15 years I must assume this is a specific Win11 issue.
After all CTGW is a game from 2010 so incompatibilities with Win11 are bound to happen.
I'm just a guy modding the game and I DO blame Slitherine to sell the game without a warning to Win11 users.
If commenting out ChangeClimate() is the only way for you to play the game at all then great.
However commenting out ChangeClimate() in Potztblitz will remove A LOT of the content though, many events check for winter state with some heavily tied to game balance.
Have a good time.
P.S: Have you considered changing the setting for virtual memory like this user reported on Steam?
https://steamcommunity.com/app/312350/d ... 955424155/
Commander the Great War/Data/Graphics/hud
If you do, then now I'm clueless and quite frankly I do give up.
Since you're the first user at all who reported that specific crash issue in about 15 years I must assume this is a specific Win11 issue.
After all CTGW is a game from 2010 so incompatibilities with Win11 are bound to happen.
I'm just a guy modding the game and I DO blame Slitherine to sell the game without a warning to Win11 users.
If commenting out ChangeClimate() is the only way for you to play the game at all then great.
However commenting out ChangeClimate() in Potztblitz will remove A LOT of the content though, many events check for winter state with some heavily tied to game balance.
Have a good time.
P.S: Have you considered changing the setting for virtual memory like this user reported on Steam?
https://steamcommunity.com/app/312350/d ... 955424155/

Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610