I suggest you do something about the issue of the app crashing in a battle causing the player to loose all deployed troops. I suggest that the attack is simply handled as not having taken place. That is as no troops were deployed and no loot taken.
A lot of people would be grateful if you did...