Page 1 of 1

[Discuss] Ways to create fatal error, freeze, and lag of WC3

Posted: March 2nd, 2013, 12:29 pm
by Apple
For WC3 only, not WE or whatever!

Fatal error(that I know of):
- Using stats tomes on non heroes
- Units spawned beyond map range
- High number of attack dice
- Battlestations on a hero
- ExecuteFunc a function that doesn't exist, or that takes arguments/returns
- Bad value to Player() such as -1
- Infinite trigger
- Trying to create a quest object at map initialization will cause a crash during load sequence.
- GetExpiredTimer() if there is no expired timer (by muzzel)
- Using a function with arguments as callback for timers (by muzzel)
- If you initialize a multiboard variable in a globals block with CreateMultiboard(), wc3 crashes as soon as a player clicks on the map. (by muzzel)
- Too many memory leaks crash the game.
- Resuming an already started Countdown Timer.(by owner123)

Blanks the map
- Division by zero.(by owner123)
Freezes:
- Infinite loop
- Forked Lightning with 0 as its Stats - Area of Effect will freeze the game.

Lag:
- Too many memory leaks crash the game.
- Overloaded units on the map
- Creating lots of threads (=forkbomb) causes extreme lag (by muzzel)


Correct me if i'm wrong
Add on if you know more

Re: [Discuss] Ways to create fatal error, freeze, and lag of

Posted: March 2nd, 2013, 1:29 pm
by owner123
- Division by zero.
- Resuming an already started Countdown Timer.
- You can do something with the Fog of War functions to crash wc3 without an error message, I don't remember exactly what though.

Units beyond map range only works sometimes btw. For example, in DotA if you throw a hook beyond map range, it doesn't crash.

Re: [Discuss] Ways to create fatal error, freeze, and lag of

Posted: March 2nd, 2013, 1:48 pm
by Apple
Thanks... this is made for finding anticheats in certain maps..

Re: [Discuss] Ways to create fatal error, freeze, and lag of

Posted: March 18th, 2013, 1:45 am
by muzzel
- Units spawned beyond map range

This doesnt cause crashs, it only crashs if you issue these units specific kinds of orders

- Division by zero.(by owner123)

Wrong, division by zero only kills the thread

More:
- GetExpiredTimer() if there is no expired timer, causes crashes
- Using a function with arguments as callback for timers causes crashes
- If you initialize a multiboard variable in a globals block with CreateMultiboard(), wc3 crashes as soon as a player clicks on the map.
- Extreme leaks can cause crashes
- Creating lots of threads (=forkbomb) causes extreme lag

Re: [Discuss] Ways to create fatal error, freeze, and lag of

Posted: March 18th, 2013, 2:19 am
by Apple
muzzel wrote:
- Units spawned beyond map range

This doesnt cause crashs, it only crashs if you issue these units specific kinds of orders

- Division by zero.(by owner123)

Wrong, division by zero only kills the thread

More:
- GetExpiredTimer() if there is no expired timer, causes crashes
- Using a function with arguments as callback for timers causes crashes
- If you initialize a multiboard variable in a globals block with CreateMultiboard(), wc3 crashes as soon as a player clicks on the map.
- Extreme leaks can cause crashes
- Creating lots of threads (=forkbomb) causes extreme lag

thanks :shock: by what do you mean thread and forkbomb.

Re: [Discuss] Ways to create fatal error, freeze, and lag of

Posted: March 18th, 2013, 10:33 am
by muzzel
Thread: http://en.wikipedia.org/wiki/Thread_(computing)

A thread is basically a piece of code in execution that gets executed in strict sequential order. A program (a map) can have multiple concurrent threads which are executed at the same time, so the execution order of different concurent threads is undefined (the cpu can switch between the execution of multiple threads, in general multiple threads can even run at the same time using different CPU cores - however wc3 doesnt support this).

When you call a function by using the normal "call functionname" notation the called function gets executed in the same thread as the calling function, if you however execute a function using "ExecuteFunc" or a timer, a new thread will be created. One very important thing about wc3 threads is that each thread has its own operation-limit (op-limit), so starting a new thread sort of resets the op-limit. A thread is destroyed when its execution is finished, or for example when you divide by zero (all other threads however continue execution).

A forkbomb is a function that recoursively creates threads (which dont really do anything). This way the existing amount of threads increases which at some point (quite fast) causes heavy lag because wc3 is bad at handling huge amounts of threads.

I hope that helped.

Re: [Discuss] Ways to create fatal error, freeze, and lag of

Posted: March 18th, 2013, 12:55 pm
by owner123
Division by zero only kills the thread, but it can still be used as an anticheat if you place the anticheat at the beginning of an important method to make the map show up blank or something like that.

Re: [Discuss] Ways to create fatal error, freeze, and lag of

Posted: March 18th, 2013, 1:01 pm
by Apple
owner123 wrote:Division by zero only kills the thread, but it can still be used as an anticheat if you place the anticheat at the beginning of an important method to make the map show up blank or something like that.


Why did you remove the map o.o
Actually my whole purpose of this post is to find ways anticheats are implemented so that I could nullify them.

Re: [Discuss] Ways to create fatal error, freeze, and lag of

Posted: June 10th, 2013, 1:07 pm
by Xirizo
I think if somehow you add a building moveing speed with cheats or some spell and move it it will error the whole game.
NOTE: i dont mean on night elf buildings since when they can walk they dont count as building anymore they count as unit.