Out of memory on saving

Post bug reports and ask for game support here.

Moderator: MOD_Flashpoint

Post Reply
kjnoel
Posts: 105
Joined: Thu Mar 10, 2011 7:43 am

Out of memory on saving

Post by kjnoel »

Hi,

I've been running a huge PBEM scenario (Soviet Army vs UK Armoured Division) on the Kirchheim map and have got 12 hours into the 14 hour mission. Both my opponent and I have been able to overcome memory issues by reboots and interim saves but now it has just got so large that every time I attempt to save after the play it gives an out of memory error and does nothing. I'm sure it was probably not intended that scenarios would get this large so not surprised, just wondered if it was fixable.

The last save file was 13.5Mb which is, I assume the problem, and I wondered if there was any way to reduce it? I guess it's that large due to the log and tracking all the units, wrecks and craters etc. Don't really care about anything other than the orders at the moment. Is there any way to prune the size of the file by stripping the log or whatever it is that causes the save file to grow so large? Or suppress it the next time we attempt something grand?

thanks.
User avatar
CapnDarwin
Posts: 9254
Joined: Sat Feb 12, 2005 3:34 pm
Location: Newark, OH
Contact:

RE: Out of memory on saving

Post by CapnDarwin »

Can you email me the latest turn and any password so I can see exactly where it is crashing. Having a lot of markers on map or generated on map can hit the limit of DC graphics handles in the 32 bit graphics. Logs are just plain text and should be able to get very large. Our debug logs are much larger than player game logs so I don't think that is the issue.
OTS is looking forward to Southern Storm getting released!

Cap'n Darwin aka Jim Snyder
On Target Simulations LLC
kjnoel
Posts: 105
Joined: Thu Mar 10, 2011 7:43 am

RE: Out of memory on saving

Post by kjnoel »

Many thanks for the quick response; have forwarded the file to your windstream email I saw in another thread.
User avatar
CapnDarwin
Posts: 9254
Joined: Sat Feb 12, 2005 3:34 pm
Location: Newark, OH
Contact:

RE: Out of memory on saving

Post by CapnDarwin »

Got it and will check it out, hopefully this evening, but more likely Wednesday evening.
OTS is looking forward to Southern Storm getting released!

Cap'n Darwin aka Jim Snyder
On Target Simulations LLC
User avatar
IronManBeta
Posts: 3313
Joined: Mon Feb 25, 2002 10:00 am
Location: Brantford, Ontario

RE: Out of memory on saving

Post by IronManBeta »

Oh, this is really cool. I haven't seen the game engine choke since Al Sandrik (Beachinole) created his original mammoth Fulda Gap scenario!

Thank you very much for uploading the saved game. This allowed me to analyze the memory use and draw some conclusions.

When the game loads under Windows 7 I see that it consumes just over 1 GB of RAM. Impressive! The max for this compile is 2 GB and the map - "Kircheim u Teck" - is a monster and is responsible for 512 MB all on its own. It is not that it is so large as that it has many layers and also cached layers at various zoom levels that builds up really quickly.

First of all, this is a different memory problem from Al's. In his case, he managed to run the game out of what are called GDI handles by creating a bazillion craters on the map. Windows OS limits the number of GDI handles for each running instance to 10,000 and each screen element (in a general sense) uses one. Each animation frame, each bitmap sprite that gets drawn, every button and edit field, etc., etc. We rewrote the code so that craters were fixed in place and therefore did not need a handle anymore. That dropped the GDI count way down and in this save file it is running at 5,700 which is fine. Very large, mind you, but fine.

Beyond that, the usual suspects were some of the lists of strings that I accumulate for end-of-game reporting, debugging, and just general 'track the state of the game' purposes. The big list contained 2.2 million strings of game state info. The player diaries between them had another 67,000 lines. There were also 2,879 map markers, 3,240 hexes and 391 units. The game event queue had 33,557 in it of which 33,254 were now handled and dormant.

Looking at all this, I tried clearing the game state list and the two player diaries. The save file size shrank to 10% of its former self and the game loads in 542 MB of RAM instead of 1,078.

CapnDarwin will help me get the file back to you. I looked at it long enough to ensure that it loads and everything *should* be fine with it but I haven't tested it properly to see. Please give it a try and let us all know how it goes.

Final pro tip if you are encountering RAM shortage errors: never zoom the map past 100% to something like 140%. The RAM usage is insane (now mostly addressed in Southern Storm). In fact, no zooming is the best amount of zooming if you can live with plain old 100%. Just a pointer.

Thanks for posting and I hope you are really enjoying the game.

Cheers all, Rob C
kjnoel
Posts: 105
Joined: Thu Mar 10, 2011 7:43 am

RE: Out of memory on saving

Post by kjnoel »

The stripped out file worked an absolute treat and my opponent and I were able to finish our monster scenario. A big thanks to the OTS team, it's great to see developers supporting their products so closely.

User avatar
CapnDarwin
Posts: 9254
Joined: Sat Feb 12, 2005 3:34 pm
Location: Newark, OH
Contact:

RE: Out of memory on saving

Post by CapnDarwin »

Very happy Rob was able to help you guys out with this monster. Be great to see some end game screen shots. The numbers you guys shoved though the game engine is quite impressive. I hope you enjoyed the battle. [8D]
OTS is looking forward to Southern Storm getting released!

Cap'n Darwin aka Jim Snyder
On Target Simulations LLC
kjnoel
Posts: 105
Joined: Thu Mar 10, 2011 7:43 am

RE: Out of memory on saving

Post by kjnoel »

The victory screen

Image
Attachments
victoryscreen.jpg
victoryscreen.jpg (276.65 KiB) Viewed 163 times
kjnoel
Posts: 105
Joined: Thu Mar 10, 2011 7:43 am

RE: Out of memory on saving

Post by kjnoel »

The turkey shoot of a contested amphibious crossing in rain at night....

Image
Attachments
Kirchheim.jpg
Kirchheim.jpg (448.95 KiB) Viewed 163 times
kjnoel
Posts: 105
Joined: Thu Mar 10, 2011 7:43 am

RE: Out of memory on saving

Post by kjnoel »

And after finally clearing the tar baby that was Kirchheim

Image
Attachments
kirchheim2.jpg
kirchheim2.jpg (457.15 KiB) Viewed 163 times
User avatar
CapnDarwin
Posts: 9254
Joined: Sat Feb 12, 2005 3:34 pm
Location: Newark, OH
Contact:

RE: Out of memory on saving

Post by CapnDarwin »

Wow, massive carnage and a nuke too. [X(]
OTS is looking forward to Southern Storm getting released!

Cap'n Darwin aka Jim Snyder
On Target Simulations LLC
Post Reply

Return to “Tech Support”