Ok here is my code. Any help is appreciated.
By my count, there are at least 1002 bytes of global data. Most Arduinos have limited SRAM (where global data resides). Because the data is so large, there is a good possibility that the stack is overrunning the data area. If you're using something like an Arduino Mega, the amount of global data probably isn't the problem.
Which board are you using?