This happened when I got into a tactical battle as a result of an end-of-turn move. My sovereign had a scheduled move onto a goodie hut, which happened to be next door to a Slag. As part of the turn cycle, the Slag attacked me. During my first move, I clicked on the Slag's portrait (to view its stats). When I did, I started getting UI popups for the next turn! Things like a description of what was in the goodie hut, information about technologies I had researched, etc.
But wait, there's more! I tried to cast a Shrink spell, and I couldn't seem to get it to go off. So I figured it was somehow "stuck" and pressed Escape to abort. That had a rather unexpected effect: it kicked me out of the battle and back to the strategic map. Where my unit was still standing next to the Slag. And I couldn't move or do anything. Clicking "end turn" caused the button to go black, but did nothing else.
Guessing you have a problem with part of the UI / game logic running in another thread or from a callback, and forgetting to check whether a battle is in progress before continuing with the "new turn" stuff.