If you button-mash during a gym fight your screen is liable to freeze. This is a server issue that needs to be fixed but in the meantime can be avoided by tapping the buttons at a more normal rate after each of your strikes land.
Immortal Boss Glitch
from PoGo Admin | 11th Jul 2016