Page 2 of 4
Re: Problem
Posted: Wed Jul 18, 2012 9:57 pm
by Chris10
VPaulus wrote:@chris
I don't know if you've made that test in the beginning of the scenario or not, but remember that you have the chance to hear up to 3 different air sounds. It's random. You can move the three and only for example hear one movement sound in all the three. So the game might not have load all of them in the first moves and it could have just loaded one of those when you've checked it again.
With the attack sound it can happen the same, because , generally, you have three random sounds to be played. Only it's more heavier because you have also an animation file associated to it.
sure Paulo...but when after playing a while the memory builds up to double or more the size of all combined graphics,sounds and other stuff together then this is a sign of a memory build up...
I made the test mid scenario (turn 15, Gazala Line)..as I said..in another ocasion the memory went up more..so that might have been another sound...obviously I wont sit down making two dozen tests making two dozen screens to proove something..it sort of has been prooven by the report of tjeren that the memory keeps building up and ultimately slows the game down...this is a sign of a classic memory leak where the application uses system memory but is unable to release it back to the system which then causes software aging (sudden performance degradation) ..when all memory is exhausted all attempts to allocate more memory will fail > crash or it creates a segmentation fault...in other word the application looses track of itself..this will crash too with the typical 0x0000000 -the memory could not be read error message
Obviously only the programmer can check the application for possible memory leaks..
As well I could be completely wrong and PzC application stores ever increasing information into the memory as a cache which then mkaes the cache grow so large to cause problmes...
Re: Problem
Posted: Wed Jul 18, 2012 9:58 pm
by sgocart6298
Are you still working on this problems because I am unable to even open the game up once it's downloaded. I gave up trying to mess with it. I never had a problem with any PzG games and I was almost finished the game when this happened. I don't understand it?
Re: Problem
Posted: Wed Jul 18, 2012 10:16 pm
by VPaulus
sgocart6298 wrote:Are you still working on this problems because I am unable to even open the game up once it's downloaded. I gave up trying to mess with it. I never had a problem with any PzG games and I was almost finished the game when this happened. I don't understand it?
I don't think that your issue is the same as the one reported by tjeren. After all you seem to be not even able to run the game.
Have you already uninstalled AK and installed it, again?
Re: Problem
Posted: Wed Jul 18, 2012 10:21 pm
by VPaulus
chris10 wrote:Obviously only the programmer can check the application for possible memory leaks..
I think Rudankort have already discarded that, or at least that's the impression I have after he had said that he already had conducted a lot of tests in that regard.
Re: Problem
Posted: Wed Jul 18, 2012 10:24 pm
by sgocart6298
You mean PC 1.10 beta. Yes, probably 4 or 5 times. Erased all fro system of course. Hopefully, the game itself will be corrected before release.
Re: Problem
Posted: Wed Jul 18, 2012 10:32 pm
by VPaulus
sgocart6298 wrote:You mean PC 1.10 beta. Yes, probably 4 or 5 times. Erased all fro system of course. Hopefully, the game itself will be corrected before release.
Then you should first to rename "Audio" subfolder to "_Audio". If the problem persists then you could also check your Internet Security program, if it's giving all the necessary permissions.
Thirdly you could try to run AK in Windows safe mode, just to check if it's able to run like that.
Re: Problem
Posted: Thu Jul 19, 2012 1:36 am
by sgocart6298
OK Thanks VPoulus
Re: Problem
Posted: Thu Jul 19, 2012 8:12 am
by tjeren
VPaulus wrote:tjeren wrote:VPaulus wrote:
@tjeren
Do you play more than one scenario, one after another, without exiting to Windows?
Panzer Corps only dumps off memory when you exit to Windows, not in the end of each scenario.
Yes, I play more that one scenario one after another, without exiting
tjeren, could you please enable the audio, and try to play one or two games at most, exit Windows and run the game again.
Maybe this way you can play with audio enable. Please, report back.
If i enable audio i can play few turns 3 or 4 most ... it would be little annoying to quit every 5min
Re: Problem
Posted: Thu Jul 19, 2012 9:27 am
by IainMcNeil
Alex if this is an issue that cant be resolved by reducing the RAM usage can we detect if we are getting close to running out of memory and flush out old sounds if we are? Alternatively can we check the RAM and only use 1 variation of the sound & movement animation if we have 2GB or less of RAM?
Re: Problem
Posted: Thu Jul 19, 2012 11:13 am
by VPaulus
tjeren wrote:If i enable audio i can play few turns 3 or 4 most ... it would be little annoying to quit every 5min
Yes, of course. But is his happening in any scenario you play?
IainMcNeil wrote:Alternatively can we check the RAM and only use 1 variation of the sound & movement animation if we have 2GB or less of RAM?
Still the problem would subsist, even without using audio. We would had to warn that it's better to not use any mods and don't play many hours without exiting to Windows.
We would have also to change the requirements of the game.
Re: Problem
Posted: Thu Jul 19, 2012 11:30 am
by Chris10
I wonder if there could be provided an extra dynamic-link library which would allow the exe to allocate more memory for those with at least 4GB of system RAM on a 32bit system...
VPaulus wrote:
Still the problem would subsist, even without using audio. We would had to warn that it's better to not use any mods and don't play many hours without exiting to Windows.
We would have also to change the requirements of the game.
This cant be the solution Paulo...
exiting the game..no mods...thats with all due respect "preposterous"...the game is a few hundred MB and no graphical comparison to any modern FPS/RPG game but turns out to be a RAM eating monster ?...there must be something wrong with the memory usage...
I wonder if memory is dynamically allocated ..if so...there is a problem
Re: Problem
Posted: Thu Jul 19, 2012 11:36 am
by Rudankort
chris10 wrote:I wonder if there could be provided an extra dynamic-link library which would allow the exe to allocate more memory for those with at least 4GB of system RAM on a 32bit system...
How DLL is going to help in our case?
Re: Problem
Posted: Thu Jul 19, 2012 11:45 am
by Chris10
Rudankort wrote:chris10 wrote:I wonder if there could be provided an extra dynamic-link library which would allow the exe to allocate more memory for those with at least 4GB of system RAM on a 32bit system...
How DLL is going to help in our case?
oh..sry..that was a bit random...I ask this cause I was told the game would freeze/crash when raching about 1GB of RAM usage...
so I assumed the game used stack memory which is 1GB default...and therefore ask for a dll whihc would allow those with more system RAM to use up to 3GB aprox
so this obviously does not help those with 2GB system RAM...
I wonder if adding freeing routines for sounds and animations may help ...
Load sounds and animations when used (I dare to say this has no performance impact) and dump them each time on hitting end turn...
so everytime the player hit end turn sounds/animations of player and AI units get dumped
Re: Problem
Posted: Thu Jul 19, 2012 11:51 am
by Rudankort
chris10 wrote:oh..sry..that was a bit random...I ask this cause I was told the game would freeze/crash when raching about 1GB of RAM usage...
so I assumed the game used stack memory which is 1GB default...and therefore ask for a dll whihc would allow those with more system RAM to use up to 3GB aprox
Game data is not stored in the stack, only local variables are, so there is no chance we could exceed a 1GB stack. It is the heap which causes the problem, and both virtual and physical memory could be an issue. On 2GB RAM systems I expect physical memory to end first. On 4GB and up systems only virtual space can be a problem, but the issue will only happen after the game has been running for a long time.
I'll try to look into this issue later today. Let's see if I can come up with anything.
Re: Problem
Posted: Thu Jul 19, 2012 11:55 am
by Chris10
Rudankort wrote:
Game data is not stored in the stack, only local variables are, so there is no chance we could exceed a 1GB stack. It is the heap which causes the problem, and both virtual and physical memory could be an issue. On 2GB RAM systems I expect physical memory to end first. On 4GB and up systems only virtual space can be a problem, but the issue will only happen after the game has been running for a long time.
I'll try to look into this issue later today. Let's see if I can come up with anything.
I wonder if adding freeing routines for sounds and animations may help ...
Load sounds and animations when used (I dont think this would have a big performance impact) and dump them each time on hitting end turn...
so everytime the player hit end turn sounds/animations of player and AI units get dumped
Re: Problem
Posted: Thu Jul 19, 2012 12:05 pm
by Rudankort
chris10 wrote:I wonder if adding freeing routines for sounds and animations may help ...
Load sounds and animations when used (I dont think this would have a big performance impact) and dump them each time on hitting end turn...
so everytime the player hit end turn sounds/animations of player and AI units get dumped
This would help if the user experience the problem after playing a few scenarios, but when it happens after a few turns, this means that we are walking on the brink. I'm not sure yet how to address this best - I need to investigate into this and see where most of the memory goes. Then it should be clear how to optimize memory usage.
Re: Problem
Posted: Thu Jul 19, 2012 12:11 pm
by VPaulus
Rudankort wrote:This would help if the user experience the problem after playing a few scenarios, but when it happens after a few turns, this means that we are walking on the brink. I'm not sure yet how to address this best - I need to investigate into this and see where most of the memory goes. Then it should be clear how to optimize memory usage.
That seems to be a good approach, Alex.

Re: Problem
Posted: Thu Jul 19, 2012 12:12 pm
by Chris10
Rudankort wrote:
This would help if the user experience the problem after playing a few scenarios, but when it happens after a few turns, this means that we are walking on the brink. .
Didnt I say exactly that ?

..with dumping sounds and animations each player
end turn (not end scenario) we wouldnt be walking on the brink, would we ?
Re: Problem
Posted: Thu Jul 19, 2012 12:18 pm
by Rudankort
chris10 wrote:Didnt I say exactly that ?

..with dumping sounds and animations each player
end turn (not end scenario) we wouldnt be walking on the brink, would we ?
We would. Sounds and animations used within a single turn do not use a lot of memory. If taking so little memory is enough to cause an out of memory condition, this is exactly what I mean by "walking on the brink". Take a bigger map with more different units on it, and we'll run out of memory even in the course of a single turn. This is not a normal situation at all.
Re: Problem
Posted: Thu Jul 19, 2012 12:46 pm
by Rudankort
tjeren wrote:I dowload beta2, uninstall old one and problem stays... in log same message, if helps when i start game it take around 480MB or ram and every second it take few kB of memory and when reach around 840MB it frezz or crash.
What to do?
tjeren, just to make sure, does the memory grow every second even if you are not doing anything with the game, or only if you are moving units/attacking etc.?