This happens during battles and seemingly at random but generally you can't finish the fight (although sometimes you can). Removing Yanfly's Battle Engine "fixes" the error. I would try to fix it but for me the error message is basically unreadable. EDIT: I've had it happened once just now (and it was out of battles, using an item). It was completely random as doing the same thing again after it crashed didn't trigger any error message. I wonder why it happens so easily and so often with Yanfly's Battle Engine though. Anyone got any clue?