Today I logged on to the app and received one of my Pokémon back after it had been in a gym for over 100 hours. I was not awarded a single coin. Im not sure if this was a bug or just a mistake in the programming, but either way I am very disappointed. Niantic can definitely fix this, and, until they do, Im not sure that I will use the app.
Sassy Sparkly Ninja about Pokémon GO, v1.37.1