I've found a bug with Bars function, it worked great until build 1978.
Description: Bars function call hangs on a newly created custom symbol or empty data symbol.
Bug started from build 1983 and later.
How to reproduce: Open a random chart and run the following piece of code (script):
You will need to forcibly remove the script from the chart because bars never return an integer.
Build 1997 fixed this particular problem for EAs and scripts.