I just ran into a bug. When leveling your pokemon to 100, any xp left over will present this error which causes you to alt + f4:
---------------------------
Pokemon This Gym of Mine
---------------------------
[Pokémon Essentials version 18.1.dev]
Exception: FloatDomainError
Message: NaN...