The greatest bug I never fixed

Bugs ain't fun. Except when they are. This is the story of the greatest bug I never fixed.

In an earlier life I wrote addons for World of Warcraft. Aside from being addicted to the game at the time, it was a mindblowing experience for someone obsessed with plugin architectures and the evolution of public APIs. It was also a great excuse to learn Lua, which is a fun language.

One of the better addons a friend and I built during that period was FriendNet. FriendNet helped to deal with the greatest challenge in the game: Finding people to play with who aren't dicks. The addon took your in-game friend list and shared it with all your friends. In return, they shared their friends with you. As a result the number of people you could trust weren't dicks increased.

Because any form of network communication was forbidden by the addon API, we had to come up with a hack to distribute those friend lists. What we did was serialize those lists into in-game chat messages and whisper them to the receiving player's avatar.

Yes, years before your Mom discovered Facebook we were tunnelling social graphs over the chat channels of a virtual world. We should have gotten funding.

Anyway, FriendNet did have some quality issues. P2P applications are hard to get right, and you can't just make people upgrade every time you release a bugfix. So we had all those different versions talking with each other, resulting in a lot of emergent behaviour and hard to reproduce bugs.

One bug was especially hard to pin down: Once every few days FriendNet would encounter a corrupt message, resulting in parts of the addon GUI to be messed up. We received enough bug reports to believe that the issue was real, but we could never reproduce the bug no matter how hard we tried. It was the bug from hell. Eventually we gave up, blamed it on a buggy API and moved on.

The solution came to me years after I stopped playing the game. When I realized what had gone wrong, the light almost blinded me.

You know, your character can get drunk in World of Warcraft. After drinking enough virtual booze, your screen will start to blur and your character will no longer move in straight lines. Also when you type something into the chat like

Penelope says: I'm so wasted

It will come out like this:

Penelope says: I'm sho washted ...hic!

Because FriendNet serialized all of its communication into chat messages, it sent corrupted data whenever the broadcasting player was drunk.

FriendNet has long since disappeared from the addon sites you could once download it from. I doubt it would even boot up in a current version of the game. But even though I never got to fix that bug, I still remember it with fond amusement.

You can follow any response to this post through the Atom feed.

Avatar

Wed, 28 Apr 2010 20:52:00 GMT

by henning

Tags:

  • Jimmy said 20 days later:

    Awesome story… but I had to share this captcha from your site that I got… It’s relative.

    http://xeno.com/h/fb215667febf26c756f8783da708ef27.png

  • Matchu Matchusian said 20 days later:

    Some would say that everything’s relative.

  • James said 20 days later:

    That was a really great story. Thanks for sharing, man.

  • iamhrh said 20 days later:

    Love the bug – Pretty sure the “modern” way of doing it is that they have allocated dedicated chat channels for this type of thing that aren’t influenced by drunkenness.

  • Muffin said 20 days later:

    The bug is that when you drink, you end up with the wrong friends!

  • Biliskner@Illidan said 20 days later:

    Yup, I remember this bug. There was another addon called “Guild Event Manager” that also propagated its data this way. The events always bugged out every once and awhile, to the point where it was more hassle than it was worth. But I remember the release notes making light of the fact that their data communication was corrupted by players getting shitfaced.

  • alex said 20 days later:

    thats was really nice to read. I love those stories of just guys at home creating something viral or even something partially viral and how it takes off on its own. as for me, attempted warcraft 3 times but never got into it (was a runescape player originally)

    never got past level 20, just seemed boring without mounts.

  • el said 20 days later:

    @Muffin Which isn’t much different from getting drunk in the real world.

  • xk0der said 20 days later:

    Great read! … it’s funny that seemingly hard to reproduce bugs are at times caused by some trivial or at least known behavior of your system. It’s always amusing when you find out the root cause of such bugs and go “holy cow, why didn’t I check in that corner to begin with?” … too bad you couldn’t get the chance to fix it. Ah! the pleasure of getting it up and running after the (bug) kill.

  • Maguz said 21 days later:

    So the fix was “Don’t drink and serialize”

  • Matt said 21 days later:

    Remember kids, never drink and whisper to your friends. You never know what kind of data they will get.

  • Kevin said 21 days later:

    Couple of questions: 1. Does an addon that does what FriendNet used to do exist today?, and 2. How does the friend list synchronization work? A distributed peer-to-peer database synchronization algorithm? Awesome! Details? Code?

  • Henning said 24 days later:

    @Kevin: I can’t say if there are addons like FriendNet since I stopped playing World of Warcraft along time ago. I have heard that the game has become much more casual since, and that finding a group of people to play with is now very easy. So maybe the pain we tried to fix with FriendNet is not as as strong as it used to be.

    The synchronization code itself was rather simple. When FriendNet discovered someone on your friend list also had FriendNet installed, the two instances would exchange lists and also notify each other of people logging in/out (because the game would only notify you of logins/logouts of people on your own list).

  • synack said about 1 month later:

    This isn’t really a problem anymore. Addons now have access to an “Addon” subchannel for each normal chat channel, allowing addons to communicate. The “drunkenness” status of the character does not influence the text of the messages being sent between addons.

  • Kacper said 3 months later:

    Wow! It’s really great bug ;)

Leave a comment