Are you pressing shift? Shift is an empty command yet to be filled, so sometimes it crashes battles.
I actually was, I realized it when I noticed that I forgot to remove my finger from my shift key during a battle phase, so yeah I guess that answers why it kept crashing during a battle. Thanks for the reply anyway.