• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Map Devours Ram, game crashes.

Status
Not open for further replies.
Level 9
Joined
May 31, 2004
Messages
90
So i have a problem and don't know if there is wa way to fix that.

When i start Warcraft 3 with my AoS map it takes up about 300mb of Ram (shown in the task manager)
about 20 minutes later it is already ~400mb and continue to grow, even after fixing most of the memory leaks.

Is that because of the repeated amount of units spawn (the map spawns about 40-50 units per trigger every 50 seconds)
I also used a trigger to remove units after they die but see no difference.

if you want to take a look at it here is an unprotected version

Aeon of Frost.w3x

This is rather frustrationg because the game usually goes on for a while and if more people play it eats up the RAM even faster and at some point the game just crashes.
 
Level 16
Joined
Mar 25, 2016
Messages
1,327
Every created unit increases ram usage and even if you remove it, it still needs a little bit. That should be no problem though unless you create tons of units.
40-50 per trigger every 50 seconds: how many of these triggers do you have? 50 units per 50 seconds is absolutely no problem
Make sure to fix every major leak. Maybe it's just because of leaks.
 
Level 9
Joined
May 31, 2004
Messages
90
i added up the amount of units spawning anc estimated it to 50 every 50 seconds.

it is 8 spawn points with 5 units each, later in the game there can be a few more units.
I removed the location leaks from the triggers, there is only a few abilitites left that leak locatios but even if i dont use these heroes the data just piles up, i don't know if 100mb in 20 minutes is normal or not but it is concerning.
i have seen wc3 games played on YT that last for like 2-3 hours and spawn far more units and the game did not crash, and when wtii played my map it crashed after like 40 minutes or so but that was before i fixed the major memory leaks.
 
Level 16
Joined
Mar 25, 2016
Messages
1,327
As i said 1 unit per second is not much and should not cause problems on it's own.
Only important leaks are leaks that happen frequently. If you have a trigger, that runs every 0.1 seconds, make sure that there is no leak, otherwise you end up with 36000(!) leaks after one hour. So make sure there are no leaks in triggers that run often, or in unit groups/loops, because these actions will be executed multiple times.
Just try to optimize the map as good as you can. Recycle units if possible, fix your leaks.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
The game will crash when ram usage exceeds 2 GB. At the rate of 100 MB per 20 minutes it would take approximately 5+1/2 hours to crash due to out of memory.

I am guessing you have leaks. You might even be leaking handle indexes which is much harder to fix with GUI alone since many GUI actions and functions leak handle indexes due to a JASS bug.
 
Level 9
Joined
May 31, 2004
Messages
90
Well i went through all the triggers again twice and actually found something ,
you were right, the used ram increases much much slower now, it was a trigger that relocated the spacebar point every 0.01 seconds. took me a little while to fix it but now it seems alright, i totaly forgot about that one.
now there is nothing left that runs repeatedly and leaks.
And i thought the map was broken entirely ^-^
 
Status
Not open for further replies.
Top