Mogmoogle Mogmoogle

[0.98][Crash] Out of Memory, again

[0.98][Crash] Out of Memory, again

After I crashed out of memory, I left open task manager to watch the memory usage when I first opened the map that gave me the out of memory error, because I have autosave at 1 turns, memory was at around 500k, after about 30 mins it slowly continued to rise until 1200k I quit after that, but I'm just saying, I take it Road Geometry is still ramping it up.

14,381 views 51 replies
Reply #26 Top

Here is a savegame.

http://dl.dropbox.com/u/9586486/Game1.EleSav

I think it's just before that battle I had a crash but it usually takes about 10 turns or so for another crash to occur. I never had a crash on exact same spot after I reloaded a game. They seem to be more 'time based' then 'specific action based' to me but it could be a combination of both. This save will probably work on that battle but if you play on 10-15 turns it should happen again - usually in some other situation. Seems that it always happens after a 10-15 turns have passed and when you try to save a game or game tries to autosave. Saving game definitely seems to be the trigger but only after you played for a short while.

Reply #27 Top

Also, we have a command Ctrl-Shift-M that will dump to your debug.err all the objects in the game. We can look at that for things that look out of line.

Reply #28 Top

Here is mine:

http://dl.dropbox.com/u/9578304/1.EleSav

On my system, usage starts out at 161 MB at the main menu, is at 604 MB once the game is loaded, and at 705 MB after 10 turns, going up from there.

Reply #31 Top

http://www.4shared.com/file/ZECmmReU/debug.html

http://www.4shared.com/file/XFuolj1n/Mod4.html

That is my Debug, and my Save game, I don't know what its up to, this game has crashed a few times but I have it on Autosave / every 1 turn so that I can capture it before crashes, also after I get it ramped way up in memory usage, if I exit the game, it exits and then says its crashing, other then that and for the first 10 mins of playing any game it runs completely fine, then consistently getting slower over a random amount of time till it finally crashes between 30mins - an hour, however I can reload the same game and It runs fine again for the first 10 mins, then does its zerg lag attack on me and I'm gone :P

Reply #32 Top

I will post mine here since this is a good reference thread.

I have an ATI HD 5800 series card with latest drivers.

Windows 7 x64 with AMD quad-core.

http://dl.dropbox.com/u/3083208/Elemental_730.zip

 

Reply #33 Top

Yea the memory issue is our #1 priority at this point. It's a show stopper.

We need everything you can give us. 

Here's how you can help:

Play the game in a window, open up the task manager and watch Elemental's memory use.

Try to see WHEN it goes up.

Reply #34 Top

I can tell you right now when it goes up in that save game, usually on the trasitional screens between tactical combat, and the map, as well as each turn, if I stay Idle and do nothing It does not budge, but during transitional phases it jumps 30k for me memory. 

 

Here I'll start a fresh game right now and then tell you when it happens in that one and post it.

Reply #35 Top

Quoting Mogmoogle, reply 34
I can tell you right now when it goes up in that save game, usually on the trasitional screens between tactical combat, and the map, as well as each turn, if I stay Idle and do nothing It does not budge, but during transitional phases it jumps 30k for me memory. 

 

Here I'll start a fresh game right now and then tell you when it happens in that one and post it.
End of Mogmoogle's quote

I can almost say the same thing about my mine with the saved games above.

 

Reply #36 Top

I assume 30M.  But that's reasonable in tactical battles. The question is does that memory get freed AFTER a tactical battle?

Reply #37 Top

Memory usage main screen 170 - 180k

New game jumps it up to 190k

Settings> Map Ahis, Large, Easy, Conquest only, NL: Enabled,  Quests, Enabled, Pacing: Normal :195k

Select Sovereign > 226k

Faction > 245k

Opponants x 1 > 272k

Map Loaded (takes about 5 seconds) > 459k

Research Screen opens the first time > 550k  Then it steadly clims to 690k till it stops > Its been increasing since this event

First Tactical Combat> brings it to > 726k

I have not done anything significant its up to 862, seems to go up and up ever since I first researched something. Ok I left the game and after I was already exited it turned off. but it was up to 900k,. Think it has to do with the research, but Ill look more into it after.

 

 

 

Reply #38 Top

I also had an out of memory error. I cannot pinpoint what started it but maybe I can rule out a few things. In the game I did almost nothing in terms of units/battles/quests. There hasn't been a single tactical battle in the game. (so I would look for the problem elsewhere unless the AI is doing tactical battles with other AIs in the background) I got a free city a the start and founded two more. Then I only focused on growing these cities, building my economy and research. A couple of turns before it was out of memory I had completed a road network between my cities.

I'll try again during the weekend and will monitor the memory consumption to provide better feedback next time.

Reply #39 Top

Not a huge leak, but I drove the memory usage from 756M to 762M just by zooming out to the cloth map and zooming back in, over and over and over, never advancing the turn.

Reply #40 Top

Quoting Mogmoogle, reply 37
Memory usage main screen 170 - 180k

New game jumps it up to 190k

Settings> Map Ahis, Large, Easy, Conquest only, NL: Enabled,  Quests, Enabled, Pacing: Normal :195k

Select Sovereign > 226k

Faction > 245k

Opponants x 1 > 272k

Map Loaded (takes about 5 seconds) > 459k

Research Screen opens the first time > 550k  Then it steadly clims to 690k till it stops > Its been increasing since this event

First Tactical Combat> brings it to > 726k

I have not done anything significant its up to 862, seems to go up and up ever since I first researched something. Ok I left the game and after I was already exited it turned off. but it was up to 900k,. Think it has to do with the research, but Ill look more into it after.


 
End of Mogmoogle's quote

:)  I wish it were that simple. The game should go up to around 1.2GB and then generally settle down. The issue is that something happens to where users are losing dozens or hundreds of megabytes at around turn 30.

 

Reply #41 Top

Quoting Publius, reply 39
Not a huge leak, but I drove the memory usage from 756M to 762M just by zooming out to the cloth map and zooming back in, over and over and over, never advancing the turn.
End of Publius's quote

That's actually not a leak. It's just caching the objects.

Reply #42 Top

Quoting Frogboy, reply 40

Quoting Mogmoogle, reply 37Memory usage main screen 170 - 180k

New game jumps it up to 190k

Settings> Map Ahis, Large, Easy, Conquest only, NL: Enabled,  Quests, Enabled, Pacing: Normal :195k

Select Sovereign > 226k

Faction > 245k

Opponants x 1 > 272k

Map Loaded (takes about 5 seconds) > 459k

Research Screen opens the first time > 550k  Then it steadly clims to 690k till it stops > Its been increasing since this event

First Tactical Combat> brings it to > 726k

I have not done anything significant its up to 862, seems to go up and up ever since I first researched something. Ok I left the game and after I was already exited it turned off. but it was up to 900k,. Think it has to do with the research, but Ill look more into it after.


 

 I wish it were that simple. The game should go up to around 1.2GB and then generally settle down. The issue is that something happens to where users are losing dozens or hundreds of megabytes at around turn 30.

 
End of Frogboy's quote

 

Well it does get up to 1.2GB but then It just keeps going up, I cant really tell what triggers it because the game is on a steady increase of about 10 - 30k each turn, but keeps going past 1.2Gb. I thought it was the AI in my 3C game because the AI players would spam stacks of 20 guys and build as many city's as close together as possible, however playing this time they computer only had one visible city, I don't think it has anything to do with my moving, 

It goes up regularly every turn, until it eventually crashes out, but I am not sure what exactly triggers it, the only thing I can really do is limit what I do, maybe keep the sovereign in the main town and spam turn to see if it happens that way, then build to see if that happens, things like that, process of elimination. I know its probably a pain to locate in a bunch of lines of code, so I can keep trying to narrow it down for you.

Reply #43 Top

It's not something that happens to everyone. That's what is making it difficult. I can play, literally, thousands of turns.

We're starting to think it's sound related.

Reply #44 Top

Elemental is not very happy when I tab out to look at task manager.  It crashed on me two games in a row.  I started out around1.2 GB, was up to 1.93 GB when I tabbed out.  This was very early in the game (first 10 turns).

https://dl.dropbox.com/u/9594297/Tab%20out%20crash.txt

 

adding the ini file

http://dl.dropbox.com/u/9594297/Prefs.ini

Reply #45 Top

Also one thing I noticed, maybe it is just coincidence, but whenever I play a custom sovereign that I have created in a previous game it almost always crashes early in the game if I try to re-use that sovereign.  When I play the pre-made sovereign I get pretty far into the game before it crashes. 

Could be just my random crappy luck too }:)

 

Also I just had a game that had loot of  (-7.7405 e -259) after a tactical battle.  The reward box had 12 guilder, and another symbol of a money bag with the rather odd number next to it.

 

Reply #46 Top

Quoting Frogboy, reply 43
It's not something that happens to everyone. That's what is making it difficult. I can play, literally, thousands of turns.

We're starting to think it's sound related.
End of Frogboy's quote

How can I give you help in the sound department, Im just using on-board audio, realtek AC97

Reply #47 Top

Quoting Mogmoogle, reply 46



Quoting Frogboy,
reply 43
It's not something that happens to everyone. That's what is making it difficult. I can play, literally, thousands of turns.

We're starting to think it's sound related.


How can I give you help in the sound department, Im just using on-board audio, realtek AC97
End of Mogmoogle's quote

If you had an OOM error, try to turn off the sound. If you won't have an OOM error after that point...well in that case Froggie was right, and this OOM error is sound related.

Reply #48 Top

Just had it happen again, around 450 turns in to the game, just came out of a tactical battle when it crashed. Had it in full screen so didn't see memory usage, or see what triggered it. Here are my dump files and save game.

 

http://dl.dropbox.com/u/9336846/Elemental0_98-2010-07-31T09-48-37-904.zip

http://dl.dropbox.com/u/9336846/AutoSave.EleSav

Reply #50 Top

That's actually not a leak. It's just caching the objects.
End of quote

Well, you know your code far better than I do, but the whole point of a cache is to find objects there and reuse them.  If I go to an area of the map that is entirely fog of war zoomed in, and entirely blank on the cloth map, and then zoom in and out repeatedly, I still see the memory go up by a megabyte or so after about 30 zoom ins/zoom outs.  Shouldn't the FOW be cached on the first zoom and reused on subsequent ones?