Entered on 21 April 2003 at 9:22 a.m..

The elusive bug

Happy Birthday Grandma. Hope you have a great day.

Well it is Easter Monday and I'm back at work. Trying to track down an elusive bug in my software, and since I've been un-successful with that, trying to work around it. I feel like a hunter who is trying to lull it's prey into a false sense of security. While I pretend to be working on other parts of the simulator code, I'm secretly hoping the bug will slip up and I'll finally be able to catch it.

For Ir and anyother CS person who reads this here's the info on the bug. See if it sounds familiar and feel free to send suggestions/advice. I've got two processes running concurrently (no they weren't forked) they were just started together in two different shells: a controller and an airspace simulator. They share information via message ques. Every now and again after the main program, the airspace simulator, receives a message from the controller it hangs. It is as if it gets itself into an infinite while loop. When I've tried to track down where it hangs, the hanging point jumps around. Once I did pin it down to between two print statements. But when I gave it a line return, the hang point moved. The amount of time after receiving one of these messages and hanging seems to be fairly constant, and thus as I change code to find it, the problem moves because it takes the code more/less time to execute. However, the hanging seems to follow a pattern more-or-less. It seems to hang two out of every three times I run the program. So, one out of every three times it actually works. To test this I've just sat here and executed it over and over without changing anything.

I figure it has to be a memory error somewhere, but haven't a clue where to begin. Any help would be appreciated. Remember I'm working in Modula-2 and so the compiler is fairly strict as far as overflow errors and such, so I have a feeling it is more-likely to be a memory error I explicitly caused.

previous - next