01 November 2006

The Ghost of Halloween Past

Usually, on Halloween, people decorate their suroundings with creepy things, including spiders, bats and ghosts.
In Eternal Lands, we have spiders, we don't have bats, and we had ghosts.

A few weeks ago, after disabling some redundant checks in a time consuming function, we started to observer something strange. In hell (the underworld) there would be some players that had a name and everything, but they didn't move, and you couldn't even interact with them (look at, trade, etc.)
Even stranger was the fact that sometimes a player with the same name was online, but sometimes there was no player but the ghost.

While this bug seemed to be relatively benign, we wanted to make sure we know why it happens, because it could have been just the tip of the iceberg. Debugging a MMO server can be very frustrating, especially when you don't even know when, why or how a bug occurs. Using a debugger is not an option, at least not when people are playing the game.
So the only tool we have are the logs. It turned out that the logs we had were not enough, so we had to log even more stuff, like for example, what ID a player has when he logs in, log each death, together with the location and time, and various other tricks.
We even made a command to check for ghosts, so we won't have to go to hell and manually look for them.

All in all it took about two weeks of looking through the code and logs, talking with players, and writting debug functions. Eventually it paid off more than I expected, because this bug could have been used, under special circustances, to duplicate items. The good thing is, no one exploited it, at least not in the last 2 weeks. Giving the complexity of the problem, I doubt anyone willingly exploited it, although I heard some rare reports in the past about bags with the same items the player was having spawning in front of the player.

Now everything is fixed, and we hope that the next Halloween we won't have any uninteded ghosts :)

0 Comments:

Post a Comment

<< Home