This is the most baffling and puzzling bug I have ever encountered or read about..

Discussions about BGA (all languages)
Forum rules
Warning: challenging a moderation in Forum = 10 days ban
More info & details about how to challenge a moderation: viewtopic.php?p=119756
User avatar
RicardoRix
Posts: 2541
Joined: 29 April 2012, 23:43

Re: This is the most baffling and puzzling bug I have ever encountered or read about..

Post by RicardoRix »

it's done server side, so php.
the framework almost certainly uses the player db table. since the db is the only method of persistently storing game data. the player table is there by default, has a field called player_no.

If the order is not the consistently the same, then it's up to the dev to use one of those other functions that take the player_id as an argument.
FrankJones
Posts: 2456
Joined: 30 June 2024, 00:24

Re: This is the most baffling and puzzling bug I have ever encountered or read about..

Post by FrankJones »

RicardoRix wrote: 08 July 2025, 21:24 it's done server side, so php.
the framework almost certainly uses the player db table. since the db is the only method of persistently storing game data. the player table is there by default, has a field called player_no.

If the order is not the consistently the same, then it's up to the dev to use one of those other functions that take the player_id as an argument.
Thank you RicardoRix. This is helping my understanding.

So, a possible explanation of the series of events that occurred in my Aquatica game.

1) I completed my turn. The BGA framework updates the db table with the current game state, and then the (Aquatica?) code called the function to change the active player to my opponent. This would be consistent with the game log showing : [bracketed items are my explanations, not part of the game log]

5:04 PM
FrankJones plays Wave-Teller
FrankJones scores 2 locations [That is what the wave-teller does]
FrankJones discards wave-teller [After playing a card, which must happen each turn, the card is discarded]
5:05 PM
ManneMan starts their turn.

[My turn took one minute, the game log confirmed my turn, accurately, and confirmed the change of active player to my opponent]

2) SOMETING happened that should not have happened. Maybe it was a commit fault? (I'm not entirely sure I understand that, but it was suggested by a friend.) Maybe my web browser has a fault that resulted in a duplicate request being sent to the BGA game server, triggering the "change active player" function to be called again, thus changing it back to my turn. skipping my opponent's turn? Maybe the db somehow had a fault and became corrupted, and executed the function, changing it to my turn? Or, it just became corrupted and the stored game state after the corruption had the game thinking it was my turn again?

3) At 11:01 PM, the game log shows, "FrankJones starts their turn".
A friend suggested that maybe my opponent logged back into the game at exactly 11:01 PM, which triggered the game log to show the (incorrectly) updated game state, though the bug/fault/error likely had already long-ago occurred.

All of this would be consistent with the game log, and would likely (but not with 100% certainty?) rule out a flawed code by the developer for Aquatica?
User avatar
nik592
Posts: 1393
Joined: 16 October 2022, 13:54

Re: This is the most baffling and puzzling bug I have ever encountered or read about..

Post by nik592 »

FrankJones wrote: 08 July 2025, 19:36 Bored me to tears, and was frustrating to work on. I remember an assignment for which we needed to use JavaScript and/or html to design a webpage and make all sorts of fussy parameters to have the page look a specific way, and I could not get my code to execute a I wanted; things did no line up, or id not scale to size the way I intended, and I hated it.
Yeah, that about sums it up.

I can't offer any perspective on what BGA does because I haven't ever attempted coding here (I'm not especially interested in spending my free time on coding, nor do I have a lot of free time anyway between two kids, part-time work, school volunteering, and other things). But as someone who has done full-stack development (and still does, but more bug-hunting than true dev, as I mentioned), I can say there are plenty of us who abhor front-end - well, mostly when you get to the finicky bugs of HTML/javascript. And don't even get me started on cross-browser compatibility...
FrankJones
Posts: 2456
Joined: 30 June 2024, 00:24

Re: This is the most baffling and puzzling bug I have ever encountered or read about..

Post by FrankJones »

nik592 wrote: 08 July 2025, 23:06
FrankJones wrote: 08 July 2025, 19:36 Bored me to tears, and was frustrating to work on. I remember an assignment for which we needed to use JavaScript and/or html to design a webpage and make all sorts of fussy parameters to have the page look a specific way, and I could not get my code to execute a I wanted; things did no line up, or id not scale to size the way I intended, and I hated it.
Yeah, that about sums it up.

I can't offer any perspective on what BGA does because I haven't ever attempted coding here (I'm not especially interested in spending my free time on coding, nor do I have a lot of free time anyway between two kids, part-time work, school volunteering, and other things). But as someone who has done full-stack development (and still does, but more bug-hunting than true dev, as I mentioned), I can say there are plenty of us who abhor front-end - well, mostly when you get to the finicky bugs of HTML/javascript. And don't even get me started on cross-browser compatibility...
Okay, good. I am glad I am not alone. :)

When my friend first suggested programming boot camp, I said to him, "I want to do back-end. I'm a math guy, problem solver, I don't care about how the game looks. Let other people deal with that. I want to solve problems. I want to fix the bugs in TFM on [lame other gaming site]"

He said, "You don't know enough yet to know what you don't know. You might end up loving front-end."

:roll:

I knew. And within a week, I knew even stronger.

And, yeah, Cross-browser compatibility. MY goodness. A very popular game here, also exists on [Other really lame gaming platform]. Even the bugs are buggy! People report bug constantly that to me, as an iOS user, I do not experience, and all I can say to them is, "hmm. Odd. When I play on my iPad, that card works fine." And, "Yeah, when you're playing on a PC and your opponent is playing on an iPad, weird things can happen."

It's especially funny when people get upset at computers.


Umm... The computers are just following human instructions. Yes, As Ray Kurzweil might say, maybe the singularity is near, and maybe Skynet is going to take over, but for now, .... We just need to be accurate and precise with our instructions. I mean, sheesh, the number of times I spent HOURS fixing a bug that was caused because I had ONE character typed incorrectly, in a way that did not give me the squiggly red line in my IDE, but nevertheless caused the code to not execute as intended. (Granted, I should have been able to start the debugger, do a stack-trace, whatever, and find the problem, but, well, I was kind of a noob :) I still am. )
User avatar
Tisaac
Posts: 2736
Joined: 26 August 2014, 21:28

Re: This is the most baffling and puzzling bug I have ever encountered or read about..

Post by Tisaac »

I can't access the code since the dev made it private but i am wondering about the undo feature. In my games, the undo also removes corresponding log entries but this is very complex because the framework is not designed to handle that. In other words, before it was perfect (at least i hope it is perfect now), it was pretty common that my undo would sometimes clear more than just the last turn's logs. So, seeing that you used undo, i am wondering if we can trust the logs or not. Do you have any outside confirmation that the turn was skipped and not just the logs that cannot be trusted ?
FrankJones
Posts: 2456
Joined: 30 June 2024, 00:24

Re: This is the most baffling and puzzling bug I have ever encountered or read about..

Post by FrankJones »

Tisaac wrote: 10 July 2025, 06:15 I can't access the code since the dev made it private but i am wondering about the undo feature. In my games, the undo also removes corresponding log entries but this is very complex because the framework is not designed to handle that. In other words, before it was perfect (at least i hope it is perfect now), it was pretty common that my undo would sometimes clear more than just the last turn's logs. So, seeing that you used undo, i am wondering if we can trust the logs or not. Do you have any outside confirmation that the turn was skipped and not just the logs that cannot be trusted ?
Both I and my opponent saw my move completed, and logged in the game log. Then we both saw the game say it was his turn. Then, we both saw the game log show it was my turn, and we both agree that he never got to take a turn.

I only clicked "undo" (Actually, in Aquatica the button is "reset my turn") when we both realized his turn was skipped. I thought maybe clicking "reset my turn" would fix the bug and make it my opponent's turn. I didn't actually undo anything - I had not started "my" turn, since it is rightfully my opponent's turn.

With 100% certainty, my opponent's turn was not taken. The game state was unchanged.
Post Reply

Return to “Discussions”