Critical error as in the game crashes entirely? If you're using the animation system, try not playing the animations. One of the animations I use in _NPCScan always crashed the game when it finished, with this error:
Code:
ERROR #128 (0x85100080) Access Out Of Bounds
Program: C:\Users\Public\Games\World of Warcraft Beta\Wow.exe
Object: .PAV?$TSList@USIMPLEANIMNODE@@V?$TSGetLink@USIMPLEANIMNODE@@@@@@
index (0xFFFFFFFF), array size (0x00000001)