Revive an old dead account from that time to use as a test account.Devari wrote:I've got a very sketchy guess that only accounts from the "original" WOA are affected. So a test account wouldn't do the trick.Nuclear Raunch wrote: And does this thing happen often enough that I could experience it easily by creating a test account?
Bug: WOA
- The Beatles
- Fear me for I am root
- Posts: 6285
- Joined: Tue May 24, 2005 8:12 pm
It seems like quite a few accounts got hit last night around 5:09 am PDT. I'm fairly sure it wasn't a case of everyone logging in at the same time...
I've got some test data that was emailed to me by the game. I need to get some more sleep now, though, so I'll deal with it when I get up. All the accounts affected are recorded in my email, though, so I'll figure out a fair way to reimburse everyone for turns lost.
An important note is that it did NOT just affect "revived" players.
But I'm too tired to type anymore right now. I'll take a shot at it in a few hours.
I've got some test data that was emailed to me by the game. I need to get some more sleep now, though, so I'll deal with it when I get up. All the accounts affected are recorded in my email, though, so I'll figure out a fair way to reimburse everyone for turns lost.
An important note is that it did NOT just affect "revived" players.
But I'm too tired to type anymore right now. I'll take a shot at it in a few hours.
If you go down to the woods today, you better not go alone
It's a lovely day in the woods today, but safer to stay at home
BECAUSE EVIL FREEN IS KILLING ALL THE TEDDY BEARS AT THEIR PICNIC
It's a lovely day in the woods today, but safer to stay at home
BECAUSE EVIL FREEN IS KILLING ALL THE TEDDY BEARS AT THEIR PICNIC
A final note to self: One person affected was on vacation. Why are vacationed players getting turns, anyway? There seems to be no check against that in the code. That needs to be fixed.
If you go down to the woods today, you better not go alone
It's a lovely day in the woods today, but safer to stay at home
BECAUSE EVIL FREEN IS KILLING ALL THE TEDDY BEARS AT THEIR PICNIC
It's a lovely day in the woods today, but safer to stay at home
BECAUSE EVIL FREEN IS KILLING ALL THE TEDDY BEARS AT THEIR PICNIC
- Slasher
- The FAF Forums SMEGHEAD!!! lol
- Posts: 2635
- Joined: Mon May 03, 2004 5:08 pm
- Location: http://florida4us.com/
- Contact:
- Ruddertail
- Promi Diplomacy ate my homework...
- Posts: 4510
- Joined: Wed May 12, 2004 11:39 pm
- Location: Chances are, playing FAF.
- Contact:
- Nuclear Raunch
- The Wanderer
- Posts: 950
- Joined: Tue May 24, 2005 4:30 am
13:30-13:44 game time, 6:30-6:44 PSTRuddertail wrote: May 22 '07, 19:38
90 turns. If that helps.
The only other 2 incidents that I know of came around 8-8:30 PST, I was halfway wondering if it was lost packets somewhere since that's a busy internet time, still could be I guess since 6:30 PST still corresponds with a lot of East Coast people getting to work and checking their email etc...
I know the voices in my head arn't real but they usually have some pretty good ideas.
M'kay, another night's automated emails to me reveal the problem:
Somehow, for some reason, $config is undefined/zero for one run of the fakecron. When that happens, $user[turns] > $config[maxturns], so $user[turns] is set to $config[maxturns], which is actually 0. All the user's turns are then put into stored turns. Theoretically, they should be rounded off. And they are; to 0. All the accounts affected have absolutely 0 stored turns. Therefore, the problem must be that $config is actually completely undefined at some point.
Turn bank is not affected, insofar as I can see, for one good reason:
$times = floor(($time-$user['turns_last'])/(60*$config['bankperminutes']));
This just becomes division by zero, insofar as I can see, when $config is undefined. Therefore, $times will never by greater than 0, so it won't try and run any turnbank code. However,, the accounts that get hit with this strange bug might not get some turnbank turns that they should...
So, we know what the problem is that causes the turns to go to 0. But why does it occur? And why only on WOA? Is it because it's the first server? Is it due to the merging, for some reason? And why on earth is $config not defined for some runs of the fakecron?
Somehow, for some reason, $config is undefined/zero for one run of the fakecron. When that happens, $user[turns] > $config[maxturns], so $user[turns] is set to $config[maxturns], which is actually 0. All the user's turns are then put into stored turns. Theoretically, they should be rounded off. And they are; to 0. All the accounts affected have absolutely 0 stored turns. Therefore, the problem must be that $config is actually completely undefined at some point.
Turn bank is not affected, insofar as I can see, for one good reason:
$times = floor(($time-$user['turns_last'])/(60*$config['bankperminutes']));
This just becomes division by zero, insofar as I can see, when $config is undefined. Therefore, $times will never by greater than 0, so it won't try and run any turnbank code. However,, the accounts that get hit with this strange bug might not get some turnbank turns that they should...
So, we know what the problem is that causes the turns to go to 0. But why does it occur? And why only on WOA? Is it because it's the first server? Is it due to the merging, for some reason? And why on earth is $config not defined for some runs of the fakecron?
If you go down to the woods today, you better not go alone
It's a lovely day in the woods today, but safer to stay at home
BECAUSE EVIL FREEN IS KILLING ALL THE TEDDY BEARS AT THEIR PICNIC
It's a lovely day in the woods today, but safer to stay at home
BECAUSE EVIL FREEN IS KILLING ALL THE TEDDY BEARS AT THEIR PICNIC
It comes to mind that a quick hack to stop the bug from actually killing all the turns of an account would be to simply only run the fakecron is $config is defined. But that's hardly the ideal solution...
If you go down to the woods today, you better not go alone
It's a lovely day in the woods today, but safer to stay at home
BECAUSE EVIL FREEN IS KILLING ALL THE TEDDY BEARS AT THEIR PICNIC
It's a lovely day in the woods today, but safer to stay at home
BECAUSE EVIL FREEN IS KILLING ALL THE TEDDY BEARS AT THEIR PICNIC
I would make this change as a test:
Change to:
The reason being is that its not $config that is not being defined, but $perminutes.
code: Select all
$times = floor(($time-$user['turns_last'])/(60*$perminutes));code: Select all
$times = floor(($time-$user['turns_last'])/(60*$config['perminutes']));all about FAVRE, come on...you know you want to click it
The Kraken, which is found primarily in Scandinavian myth, was a huge sea creature. It was said to lie at the bottom of the sea for a long time and then it would rest at the surface....Like the Midgard serpent in the Norse myths, the Kraken was supposed to rise to the surface at the end of the world.
~Beatles..."I'm sorry, but I really can't see anything redeeming in your philosophy other than that dinosaurs are cute."
The Kraken, which is found primarily in Scandinavian myth, was a huge sea creature. It was said to lie at the bottom of the sea for a long time and then it would rest at the surface....Like the Midgard serpent in the Norse myths, the Kraken was supposed to rise to the surface at the end of the world.
- Slasher
- The FAF Forums SMEGHEAD!!! lol
- Posts: 2635
- Joined: Mon May 03, 2004 5:08 pm
- Location: http://florida4us.com/
- Contact:
- The Beatles
- Fear me for I am root
- Posts: 6285
- Joined: Tue May 24, 2005 8:12 pm
Ah, I have it.
When the server argument is invalid, such as in:
http://frostnflame.org/?top10&srv=14
The game defaults to displaying server 1, but config.php is not called correctly. The game used to return a blank page in such cases, but I changed that behaviour for some reason. (I am sorry if I just wiped everyone's turns.)
Presumably some web crawler would occasionally hit an invalid URL such as that and break it. In the ME code, it might still be die()-ing correctly in that case. Now I am off to fix it.
[edit] OK, it should now be fixed. I'm off to give everyone max turns as a celebration and to fix anything I've messed up. Let's see if this takes care of market issues as well.
[edit2] Further proof, if necessary -- everyone now has 3 turns. I will add 447 to that.
A big thanks to Devari for tracking the issue down!
When the server argument is invalid, such as in:
http://frostnflame.org/?top10&srv=14
The game defaults to displaying server 1, but config.php is not called correctly. The game used to return a blank page in such cases, but I changed that behaviour for some reason. (I am sorry if I just wiped everyone's turns.)
Presumably some web crawler would occasionally hit an invalid URL such as that and break it. In the ME code, it might still be die()-ing correctly in that case. Now I am off to fix it.
[edit] OK, it should now be fixed. I'm off to give everyone max turns as a celebration and to fix anything I've messed up. Let's see if this takes care of market issues as well.
[edit2] Further proof, if necessary -- everyone now has 3 turns. I will add 447 to that.
A big thanks to Devari for tracking the issue down!
:wq
-
Members connected in real time


