PDA

View Full Version : Warcraft 1.24d AI freezing issues


Steelb_l_ade
10-02-2010, 19:42
Hey guys, quite a few people have reported issues with the AI freezing but as of yet have not provided many details on what may cause it, it seems to be random but only present in the teamplay mode.

Today I found some intresting news on THW regarding a bnet hack that was around lately:
"The crash worked by abusing the finite stack size that the WC3 main thread had. Many people who map WC3 probably have noticed how triggers can only execute so much code in one batch before the execution stops whether or not the end of the code was reached. Getting too many operations to run at once will result in WC3 hitting its stack size limit and so prevent any further execution of actions.

The glitch that the hackers used to crash players was simply getting a unit to execute an order with a non positional exit and then que up approximately 10000 invalid build orders which will collapse instantly and so hit the main thread stack limit. When this stack limit is reached, the game crashes. The accompanying hack for this crash however made the cheater immune to the crash (by for example increasing the stack size) and then could be used to issue 1000s of invalid build orders to collapse instantly when ready. To get the orders to collapse, a building must be qued inside an existing building 1000s of times so they all the qued orders can collapse at the same time. This que is started by getting a unit to patrol or smart another unit in an order which only can finish when the unit dies and then, after queuing enough build orders, killing the followed unit so the builder tries to complete them. The hack helped here again by ordering buildings inside already built buildings which is impossible is normal WC3.

This patch prevents (or is said to) stack crash from occurring so melee ranked games should be playable again. However by fixing this bug they may have changed the mechanics behind certain systems of the game in a currently unknown way."

This non-complete execution of code is something I have run into before during Rotg's development and due to the sheer amount of commands being executed when the AI is, for example shopping it may be its not completly executing all the code and therefore the AI just seems to "stop" as its final order strings are not being ran.

Please let me know if this issue remains with the new patch as if it does I can try to reduce the amount of code the ai uses per execution.

GunnarStyle
11-02-2010, 12:04
Ah so thats why I've never had the AI freezing - I had an anti crash hack program made by the same creators of the crash hack in last patch :)

GunnarStyle
11-02-2010, 12:05
The anti crash hack siimply just increased my stack size btw. That was the explanation they (creators of anti crash hack) gave more or less