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

Is there any hope for my map? I have bug where players sometimes get 1 fps

Status
Not open for further replies.
Level 12
Joined
Jul 17, 2013
Messages
544
At first, I would like to say, "I am aware of memory leaks! I know how to fix and prevent them." I have checked my map thousands of times for any leaks or major leaks.

This issue has been growing on me, and I have been unable to fix it. It has existed in my map for about two years. In approximately 1 out of 10 games, after over an hour of playing (which is almost the end of the game), it starts lagging very hard, and it only gets worse over time. It appears to be a memory leak. Towards the end, people are stuck at 1 fps and have to force quit the game. Those with better computers obviously experience better fps.

I have a lot of triggers, around 2k, and many custom spells on this big map. Each of my 9 heroes uses at least 3 custom spells. I also use a damage engine and have spells that knockback and run every 0.03 seconds. I have tried to check all triggers, but I haven't found anything.

I have also tried to look for a logical sequence of events to detect what may cause the lag, but it all seems so random and undetectable. One thing I am sure of is that it never happens at the start of the game.

In this situation, what would you recommend? You can find my map at this link: The Big Fellowship Quest V.5.5d. Additionally, my map spawns a lot of units, and they keep getting killed, so at this point, anything could be responsible for the 1 fps drop. I have even heard that custom models might be causing the issue, and I use a lot of them.

I use GUI and JASS. Is it possible to debug or print out what might be leaking? In other words, is there a debugger available or any other advice you can provide?
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,875
Hmm but wont memory grow anyway because sometimes morę or less actions happen?
What happens around the 1 hour mark? You should focus on those triggers first. Something around the 1 hour mark could be creating A LOT more memory leaks, so you should be able to see a noticeable increase.

Also, it'd be a good idea to design your map to have it's own in-game debugging tools. For example, you should be able to type "-final boss" and have the game trigger the final boss fight. This way you can save a lot of time while debugging.

And are you sure you're aware of every type of memory leak? It's pretty easy to let some slip by.


As a side note, I noticed this is a pretty common problem for people modding Warcraft 3. They begin with what's a somewhat simple map and aren't aware of the pitfalls that come with not organizing and structuring their maps properly, as well as being unaware of things like memory leaks. After so many years of development they wind up with issues like these which would be much easier to sort out had they done things "properly" from the start. But this is not meant as an insult, I realize hindsight is 20/20 and it's easy to fall into this trap. So to anyone starting out or planning on making a project, save yourself a huge amount of work in the future by learning how to do things the right way from the get go.
 
Last edited:
Level 9
Joined
Aug 16, 2019
Messages
83
@StangtennisGuru had the same problem in his map and was able to fix it. Maybe he can help out.
That was a pretty map specific solution, unfortunately. Basicly I was using a lot of performance tracking something unnecessary.

What I will say is that it's not necessarily memory leaks, in my experience their effect is fairly small compared to if you've got a lot of intensive things going on at once at that point in the game like we do in our map, but I guess it depends on the size of the leak. But yea I think using the task manager to test some stuff out is the best option, leaks will cause a steady increase in memory usage and it won't go back down. You could maybe set up triggers to use a specific spell over and over and test it out with your custom ones to see if any of them are responsible.
 
Level 12
Joined
Jul 17, 2013
Messages
544
That was a pretty map specific solution, unfortunately. Basicly I was using a lot of performance tracking something unnecessary.

What I will say is that it's not necessarily memory leaks, in my experience their effect is fairly small compared to if you've got a lot of intensive things going on at once at that point in the game like we do in our map, but I guess it depends on the size of the leak. But yea I think using the task manager to test some stuff out is the best option, leaks will cause a steady increase in memory usage and it won't go back down. You could maybe set up triggers to use a specific spell over and over and test it out with your custom ones to see if any of them are responsible.
So issue of ur drop was too much stuff hapenning at once, right?
 
Level 12
Joined
Jul 17, 2013
Messages
544
What happens around the 1 hour mark? You should focus on those triggers first. Something around the 1 hour mark could be creating A LOT more memory leaks, so you should be able to see a noticeable increase.

It'd be a good idea to design your map to have it's own in-game debugging tools. For example, you should be able to type "-final boss" and have the game trigger the final boss fight. This way you can save a lot of time while debugging.

Also, are you sure you're aware of every type of memory leak? It's pretty easy to let some slip by.


I imagine this is a pretty common problem for people modding Warcraft 3. They begin with what's a somewhat simple map and aren't aware of the pitfalls that come with not organizing and structuring their maps properly, as well as being unaware of things like memory leaks, and after so many years of development they wind up with issues like these which should be much easier to sort out had they done things "properly". But this is not meant as an insult, I realize hindsight is 20/20, and it's easy to fall into this trap. So to anyone starting out or planning on making a large project, save yourself a huge amount of work in the future by learning how to do things the right way from the get go.
i have learnt how to do things propley recently xd my map is all mess its opposite of ,,clean code'' xd

i have also realised its harder with using gui to keep stuff in order, in standard programing its easier because u can make one function and call it if needed in gui i can make separated trigger but i still find it harder.



also i did first memory track useage



at start it was at 6,9 gb then it dropped after 10 min to 6,0 (i didnt do anything other at computer i swear so maybe some background thread?)
then memory useage throught most of game was at 5,9 gb - 6,1 at end it increased to 6,3 but then dropped to 6,2
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,875
When you're testing the map are you recreating the events that happen in the late game? A spell that an enemy casts later on, a trigger that turns on once you reach a region, etc... Look for things that only happen later on. That's why I suggested creating some debugging triggers to help test different parts of the game. I realize if the map is very messy this could be a real nightmare to do but it could be worth it.
 
Level 12
Joined
Jul 17, 2013
Messages
544
When you're testing the map are you recreating the events that happen in the late game? A spell that an enemy casts later on, a trigger that turns on once you reach a region, etc... Look for things that only happen later on. That's why I suggested creating some debugging triggers to help test different parts of the game. I realize if the map is very messy this could be a real nightmare to do but it could be worth it.
but what am i supossed to print out in game with messages? only things i suspect? i guess there isn't any global way to debug everything
 
Level 12
Joined
Jul 17, 2013
Messages
544
Maybe you are using systems that do a lot of operations in very short intervals of time, those things can lag even if they don't increase the memory used.
systems idk but spells yea like knockback, i have a lot of custom spells downloaded from hive workshop spell library, they have 0.03 events. also the lag my map has is pernament it isnt gone it grows ove rand over eating fps
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,875
This issue has been growing on me, and I have been unable to fix it. It has existed in my map for about two years. In approximately 1 out of 10 games, after over an hour of playing (which is almost the end of the game), it starts lagging very hard, and it only gets worse over time.
I'm saying that you need to run the triggers that happen around the 1 hour mark, assuming what you said above is the case. I imagine the game has advanced pretty far by that point in time with new enemies, new spells, new triggers, new areas, etc... If you start a new game and go afk with task manager up are you really testing the memory leaks when the triggers that create them aren't even running?
 
Make sure the other people are using -opengl if they are running Windows 10. There are inherit frame rate issues with Windows 10's D3D8 fixed render pipeline which cause irregular and very poor frame rates.

Possibly?
 
Status
Not open for further replies.
Top