Having all of yours and an opponent's pokemon faint at same time doesn't count as loss
Issue #2377
new
When a player's last pokemon faints the same turn as an opponent's last pokemon faints, the game doesn't count it as a loss, and allows the player to resume the game with a party of fainted pokemon. Attempting to start a battle in this state crashes the game.
This happened when fighting the bottom-right trainer in the Suntouched city gym. I had a delta wartortle and nidorino in my party; my wartortle had already fainted, and my nidorino fainted on the same turn that the opponent's litwick fainted (the litwick fainted from poison).
I was using cheat engine's speedup function as well.