• 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.

[Solved] Crash when playing multiple games, never crashing in the first game?

Status
Not open for further replies.
Level 6
Joined
Sep 9, 2015
Messages
136
I have 1 problem as follows:
  • If I play 2 games in a row, then in game 2 there will be a chance of crashes as shown below (chance is about 30%).
2021-03-26_011336.png

  • The higher the crash rate if i play more games continuously.
  • But if after every match I reset my war3 then I will never crash.

Is it because the map is too heavy? (Once this map is loaded, the RAM takes up about 600-700mb, and will gradually increase to 800mb by the end of the game).

Update: Finally I know the reason. Because I moded 2k resolution terrain textures for my war3 folder. When I go back to using the original war3 I don't have that problem anymore.
 
Last edited:
Level 6
Joined
Sep 9, 2015
Messages
136
Sounds like the map has a lot of memory leaks and needs to be cleaned up with the code. Probably a lot of unit group and point leaks.
I dont think map have any leak or big amount of leaks cause that issue (leak have different behave: start lagging and inscrease lag until freeze). In this case, it's just happened immediately, usually a few seconds after entering the game.
It never happen in first match, and it only happen for some people. Some guys never meet this issue even play this map continuously.
 
Last edited:
Level 13
Joined
Mar 24, 2010
Messages
950
I only guessed maybe some memory leaks because there is some issues like this that can travel from game to game unless exiting wc3 in-between playing. Also the way you described it taking more memory each time the game was played sounded like a symptom of that.
does it have locals not being cleared? it just sounds like something where things arent being cleaned up and carrying over from game to game.

I remember some version of battle ships or hero siege game back in the day (cant remember the game or version now) had an issue with desyncs and if someone played that game first and then played a different game with no issues it could sometimes cause a desync in another game if any player played that game before hand.

without looking through code i cant think of any other guesses.
 
Level 6
Joined
Sep 9, 2015
Messages
136
I only guessed maybe some memory leaks because there is some issues like this that can travel from game to game unless exiting wc3 in-between playing. Also the way you described it taking more memory each time the game was played sounded like a symptom of that.
does it have locals not being cleared? it just sounds like something where things arent being cleaned up and carrying over from game to game.

I remember some version of battle ships or hero siege game back in the day (cant remember the game or version now) had an issue with desyncs and if someone played that game first and then played a different game with no issues it could sometimes cause a desync in another game if any player played that game before hand.

without looking through code i cant think of any other guesses.
Leak can travel from game to game? That's sound weird.
 
Level 6
Joined
Dec 29, 2019
Messages
82
Leak can travel from game to game? That's sound weird.
Memory leak means your game process will allocate place on your RAM and won't release it ... that means even after you close your map, war3.exe process will be still running and this allocated place on your RAM won't be released ... because memory free call will never occur ... it will be finally released only after you close entire game when your operation system flush all memory tracks connected with game process.
 
Level 6
Joined
Sep 9, 2015
Messages
136
Memory leak means your game process will allocate place on your RAM and won't release it ... that means even after you close your map, war3.exe process will be still running and this allocated place on your RAM won't be released ... because memory free call will never occur ... it will be finally released only after you close entire game when your operation system flush all memory tracks connected with game process.
How many number of leaks to cause that error? It's weird, because we are all do remove leaks when coding, so it's hard to map have massive leaks.
 
Level 6
Joined
Sep 9, 2015
Messages
136
Should be load of them ... you can easily check it in task manager, check how much memory you get here at the start of the map and then check how much you get when u finish it
When game start it's about 650mb, when endgame (about 30min later) it's near 800mb. And i have a question: does add/remove unit to/from a group cause leak?
 
Level 6
Joined
Dec 29, 2019
Messages
82
When game start it's about 650mb, when endgame (about 30min later) it's near 800mb. And i have a question: does add/remove unit to/from a group cause leak?
It shouldn't but i rather avoid using unit groups in my project ... using Lua tables instead ... much faster / safer aproach, when u use groups just make sure you clean them with DestroyGroup() when you won't use them anymore otherwise it leaks...
 
Level 6
Joined
Sep 9, 2015
Messages
136
It shouldn't but i rather avoid using unit groups in my project ... using Lua tables instead ... much faster / safer aproach, when u use groups just make sure you clean them with DestroyGroup() when you won't use them anymore otherwise it leaks...
I do clean everything can cause leak (like this toturial Memory Leaks | HIVE (hiveworkshop.com)). Just have 2-3 unit group use all the time of game, not create, not destroy, just add and remove unit to/from it. If that not leak, i think this error not about leak.
 
Level 6
Joined
Sep 9, 2015
Messages
136
Finally I know the reason. Because I moded 2k resolution terrain textures for my war3 folder. When I go back to using the original war3 I don't have that problem anymore.
 
Status
Not open for further replies.
Top