I cannot fully follow what happened from your description. I assume the sequence of events was:
1. Canton is owned by civilization A (China?)
2. Civilization B demands Canton
3. You demand Canton
4. You get awarded Canton and the city is assigned to you
5. Civilization B also gets awarded Canton and you get the event to refuse the flip
Is that right? Or did you own Canton before the congress even started?
In my recent French playthrough (still working on it), I think three of the ten Congresses so far were "corrupted" in a way that forced me to reload the game from EoT of two turns earlier, then replay the turn before the Congress. Probably because of the random factor, the new attempt at going into Congress usually works smoothly; which was also the case with the broken one where I showed the bug-messages.
I haven't kept the savefiles from that other "corrupted" congress that revolved around Canton.
Apologies for my earlier, much more incomplete explanation. If I remember correctly the sequence of events was:
0. Guangzhou owned by China.
1. Congress starts
(I don't remember if that dialog also appeared twice? It seems plausible in retrospect...)
2. I demanded Guangzhou
3. I demanded Guangzhou, a second time
4. The first foreign demand was the Mughals demanding some Turk/Iranian city, as expected
5. The second foreign demand was suddenly someone else, maybe Netherlands (instead of the Mughals) demanding the same Turk/Iranian city, while the screen switched to Tasmania.
5+n From then on, no demands made any sense: From other Congresses I knew that for example China would each time invariably demand Pyongyang - but this time around the Iranians demanded Pyongyang with the screen panning to show me the situation of Novgorod (usually a demand by either Sweden or Poland). But I think this whole nonsense was just in the display+dialog and that in the background, the demands were processed correctly (but twice), given the rather "normal" results.
6. after each participating Civilization made two demands, we got the screen where the exchanged cities are displayed twice each [
View attachment 667545]
7. I then dared to refuse to cede Canton to myself, and so four of the five still independent participants (Mughals, Russia, Durch, Iran - but not China) DoWed on me. [
View attachment 667546]
I have no idea about your underlying coding, nor about what triggered this event. Maybe it already helps to prohibit two Congresses from taking place simultaneously.