HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Questions on what can cause lag/fatal error

03-22-2005, 10:08 PM#1
leonine
1) If there is a memory leak which keeps running, will it continually stack until WC3 can't handle it anymore and forces it to crash?

2) Is 50 units excluding stationary creeps and heroes to much for the game to handle at one time?

3) Do corpses contribute to lag if there's a lot of them (like 2-300)?

4) I've heard that skills with more than the standard 3 levels of skills can cause lag, is this true?

5) Does a divide by 0 computation cause fatal errors?

6) If condensing say 20 triggers into 1 creates a trigger of length about 10 pages, is it to much to get the game to run it every 40 seconds? (If so, is it still to demanding after 60?)

7) The load time on my 2.8 is about 2 minutes. There's no lag in the beginning but slowly and surely the game starts stacking it on me and I really feel it. Is this because of a memory leak?

8) Sometimes I half lose control of my hero. I'll right click a place or attack-move a place but it will keep bringing up the rally point flag and he'll run through all the checkpoints before I regain control. Why is this?

9) The game continually crashes around 17:30 minutes, is this likely because of a trigger, since it is 100% consistent?

10) If I can't solve my fatal errors problem, would it be possible to post my map up here and have someone look into it?

Thank you
03-22-2005, 10:22 PM#2
Azhag
1- I'm not sure about this one, but memory leaks arn't fun, and will lag enough for the player to quit....(depending on the leak)
2- Barley. Play things like footman wars where you get into 100's of units sometimes, and my computer still runs fine.
3- Yes. Excessive corpses will lag the game, its just more information the computer has to handle. My opinion is for you to disable the corpses, so the lag will stay at a minimum.
4- No. It will just make the loading time of the map longer.
5- I don't think anything will happen if you divide by 0. Ex. 4 divided by 0 = 0. So the answer will always be 0.
6- I don't think so. 40 seconds gives it a lot of time, but I'm not sure. Maybe another member can help you with this question.
7- Possibly. What happens when the lag start to get into affect? What is heppening?
8- Why does your hero give a rally point flag? That shouldn't be. Check and see if his unit-classification is building.
9- Possibly. Again what is happening when it crashes?
10- For sure. If you really want, PM it to me, and I'll check into it...

Hope I helped.
~Azhag~
03-23-2005, 02:31 AM#3
Guest
The main thing I wanna just tell you is that Corpses are a HUGE deal. Although it wouldnt seem like it, since they just sit there, are seemingly 2D, and dont have any animations, think of corpses as another completely active unit.

The reason is that the game keeps track of each corpse individually as if it was a unit, because there are spells/effects that effect corpses and the game will always do this...

The best way to handle it is to have the corpses expire ahead of time, and even quicker way to do this than corpse expire/rot is to just remove the unit. A unit controlled by (player) dies > any constraints you have in mind > Wait a short time (your preference but you should leave a few seconds in there) & Remove (triggering unit) from the game.

Always keep corpses in mind, because sometimes they can create HUGE problems, even when out of sight range.
03-23-2005, 03:00 AM#4
imwithsstupids
Quote:
Originally Posted by Azhag
5- I don't think anything will happen if you divide by 0. Ex. 4 divided by 0 = 0. So the answer will always be 0.

Just to let you know, you cannot divide by zero, can you divide 4 into 0 equal groups, nope. if you say 4 / 0 = 0 then 0*0=4witch is not true. you can however do 0 / 4 = 0 because 0*4=0 :)
im not sure what it would do but it would get confused
if you do anything with player 0 it will crash the game because it cannot be done (there is no player zero)
03-23-2005, 05:07 AM#5
Azhag
Quote:
Originally Posted by imwithsstupids
Just to let you know, you cannot divide by zero, can you divide 4 into 0 equal groups, nope. if you say 4 / 0 = 0 then 0*0=4witch is not true. you can however do 0 / 4 = 0 because 0*4=0 :)
im not sure what it would do but it would get confused
if you do anything with player 0 it will crash the game because it cannot be done (there is no player zero)

Ya sorry bout that, I haven't had a math class in awhile, lol. Thx for correcting me.
03-23-2005, 12:01 PM#6
35263526
Quote:
Originally Posted by leonine
1) If there is a memory leak which keeps running, will it continually stack until WC3 can't handle it anymore and forces it to crash?
Yes.
Quote:
Originally Posted by leonine
2) Is 50 units excluding stationary creeps and heroes to much for the game to handle at one time?
On screen? Most likely, although it depends on computer specs. In the entire game? Not at all, I've had 400+ units in a map with no issues.
Quote:
Originally Posted by leonine
3) Do corpses contribute to lag if there's a lot of them (like 2-300)?
Yes, it's important to use corpse decay whenever possible because each corpse stores the details of what it was before death.
Quote:
Originally Posted by leonine
4) I've heard that skills with more than the standard 3 levels of skills can cause lag, is this true?
Not at all.
Quote:
Originally Posted by leonine
5) Does a divide by 0 computation cause fatal errors?
Not to my knowledge.
Quote:
Originally Posted by leonine
6) If condensing say 20 triggers into 1 creates a trigger of length about 10 pages, is it to much to get the game to run it every 40 seconds? (If so, is it still to demanding after 60?)
20 triggers running every 40 seconds is far less efficient than 1 very long trigger running every 40 seconds. It's still gonna cause some slowdown but you'll minimize it by condensation.
Quote:
Originally Posted by leonine
7) The load time on my 2.8 is about 2 minutes. There's no lag in the beginning but slowly and surely the game starts stacking it on me and I really feel it. Is this because of a memory leak?
Warcraft III is notorious for leaks. I'd suspect one unless something else became obvious.
Quote:
Originally Posted by leonine
8) Sometimes I half lose control of my hero. I'll right click a place or attack-move a place but it will keep bringing up the rally point flag and he'll run through all the checkpoints before I regain control. Why is this?
Can't say I've ever heard of this happening.
Quote:
Originally Posted by leonine
9) The game continually crashes around 17:30 minutes, is this likely because of a trigger, since it is 100% consistent?
As you're running the same scenario with each map run, it's likely that a leak would reach a critical point by that time each time. Of course, it could be because of a bad trigger that runs then, but I'd need more data to know.
Quote:
Originally Posted by leonine
10) If I can't solve my fatal errors problem, would it be possible to post my map up here and have someone look into it?
I might be able to if you want, but I'm a little busy so it'd take a few days.
03-23-2005, 11:01 PM#7
imwithsstupids
I made a sample map that just displays varius multiple division equations. and the last one i put in was 4/0 and it didnt even show up. here are my triggers

Divide by 0
Events
Time - Elapsed game time is 3.00 seconds
Conditions
Actions
Game - Display to (All players) the text: Attempting to divid...
Wait 1.00 seconds
Game - Display to (All players) the text: (4 divided by 3 = + (String((4 / 3))))
Game - Display to (All players) the text: (4 divided by 2 = + (String((4 / 2))))
Game - Display to (All players) the text: (4 divided by 1 = + (String((4 / 1))))
Game - Display to (All players) the text: (4 divided by 0 = + (String((4 / 0))))
Wait 2.00 seconds
Game - Display to (All players) the text: Success!
Game - Victory Player 1 (Red) (Show dialogs, Show scores)


After the divided by 1 nothing else in the trigger runs so it wont end in victory or display success. i didnt leave it running to long so im not sure what it will do in the long run. but i think i heard my computer start to spin up after that (or it was just loading wc) :) it might be usfull to know that it will cancell out all the actions after the dividing one
03-24-2005, 02:25 AM#8
Reaper359
Dividing by zero results in an undefined number. Undefined numbers don't exist in binary, so a raw calculator (a calculator that isn't designed specifically to handle undefined or imaginary numbers) will not understand this. A calculator will display the message, ERROR, because it doesn't comprehend the resulting number.

Warcraft 3 uses a raw calculator.
03-24-2005, 05:04 AM#9
leonine
Well, I've done all I can with optimization and testing different spawn time, corpse decay, and unit types, but I can't find the reason it crashes around 20 minutes (every damn time too). So, I hope that someone up here can help me and find out why. Goes without saying that whoever finds the reason gets whatever they want credit wise.

This requires WEU and is also modeless, since I had to make it under 2mb.

Thanks
03-24-2005, 07:26 AM#10
Azhag
Ahha, I found the problem!!!
The variable, I think, called DisplayTimedTextToPlayer is gliched.... Remake it. It doesn't have a database, and 20 mins in, I guess it uses it, and since it has no database, it crashes cause it has no data to use.
03-24-2005, 08:31 AM#11
leonine
I can't find where I wrote DisplayTimedTextToPlayer, only DisplayTimedTextToForce. Could you be more specific and point me to the trigger please? Thanks.
03-24-2005, 09:22 AM#12
Azhag
Well I didn't acually open the map because it wouldn't allow me. It was called a "Trigger database DisplayTimedTextToPlayer is missing, and couldn't load."
Then it shut down my WE. So it must be in a trigger. Think of when you needed to use a DisplayTimedTextToPlayer variable. Possibly when you are trying to update a leaderboard, or multiboard? Hope I lead you in the right direction.
~Azhag~
03-24-2005, 04:13 PM#13
imwithsstupids
i found something else that causes fatal errors. i was playing around with meteors and triggers making craters in the terrain. and it kept happening in the same spot gettting lower every time. it got super deep. and eventually my guy started to float on top of it. then the ground turned all wierd, then a fatal error. so if u mess with the terrain tho triggers to much it will crash
03-24-2005, 07:11 PM#14
leonine
Unfortunately, that would not be the problem. It's simply a shortcut function that is used by WEU as oppossed to get DisplayTimedTexttoForce ( Player(0) ""). It comes up as missing the database because you either don't have WEU or didn't load it with WEU. Thanks though.
03-24-2005, 07:17 PM#15
Azhag
Hmmm. I think I have done all that I can do. Hopefully I can help some more, but I all out of ideas that would cause it. My suggestion is play the game, and when its about to crash, check whats going on around you or whatever. If you see something that happens or is about to happen, and it crashes, look into the triggers where this might happen.
~Azhag~