The weekly newsletter for Fed2 by ibgames

EARTHDATE: May 3, 2009

Official News page 2


HOW THE BUG WAS HUNTED

by Hazed

Alan is continuing to put new code to do with businesses into the test version of Fed2, and the test team are diligently trying it out to see if they can break it. But in between that, they sometimes wrestle with more trivial bugs. Here's the story about how a mysterious bug was hunted.

It was about two months ago when Catspaws and Arlene were chatting with me in Chez Diesel on Mars. Catspaws decided to leave to go back to her planet, so she walked downstairs to the road where she could use her teleporter to travel across the Galaxy in the twinkling of an eye (or equivalent).

As she left CDs, we saw the usual message:

Strutting in wearing a new pair of stilettos, Catspaws has left.

(Yes, in Fed2, seeing a cat wearing stilettos is fairly usual!)

But strangely, a few seconds later, this message was repeated. Catspaws appeared to have left CDs twice. Very odd! I called Cats back to CDs to find out what she had done to produce this strange second message, and after some mutual head scratching and brainstorming, we figured out it was something to do with teleporting off the planet. What we couldn't understand was why the message only showed up in CDs. We did experiments to try and make it happen elsewhere, but it was no use. It was something unique about the bar that was making it happen.

We did figure out that it only happened when teleporting to another system, but then we were stumped, and couldn't think of anything else to try. So we did the sensible thing: we turned the problem over to Bella, by putting in a bug report.

Time passed...

A week ago, I asked Bella whether she had been able to figure out the cause of this strange extra message. She mumbling something vague about having looked at the code but not found anything obvious, and suggested that the test team have another go and figuring it out. Talk about passing the buck!

I gave the test team their new task, and duly instructed, they set about to try all kinds of different things to see if they could figure out the exact circumstances that produced the extra leaving message. After a few days, they hadn't got very far... they still couldn't find anywhere except CDs where the spurious message showed. They had narrowed it down to just a handful of planets which produced the bug when teleported to. So we reconvened in CDs to talk about the problem and try to identify just what was going on.

First thing I did was to pull up the planet file for Mars and look at Chez Diesel in the editor, so I could list all of the things that made it different from other locations: it was a bar, it was teleport shielded, it was location number 260, it had events on it that were triggered when you walked in... none of those jumped out as being particularly significant.

So I started to wonder just why the extra leaving message only appeared when teleporting to certain planets. One of the planets was Jezz's Ritual. Was there something that the LP had in common with CDs, I asked? For example... what was the location number of the LP?

Bingo! It was location 260. We had found our match.

To double-check, I searched through the Sol files until I found a location whose number matched the LP on Litterbox. It turns out that just north of the moon's LP does that. And if you sit in that location, you get to see the message when someone teleports to Litterbox. We'd found the bug!

We put in another bug report to Bella, and this time, knowing that it was caused by messages being sent to the location with the same number as the destination LP, she was able to fix it. The fixed code has gone into the test version, and it definitely does fix the bug.

Meanwhile, it's still in the live game, and will remain there until the completed code for businesses go in, so if you want to reenact our testing you can!

Fed2 Star index Previous issues Fed 2 home page