The bliss of debugging

The worst monsters in the Hearthlands warp the fabric of space and time..

The bliss of debugging

Postby loftar » Mon Jun 08, 2009 12:55 am

I just fixed a potential crasher bug which would trigger when you right-clicked a construction post whose construction window was currently open and empty of resources. The server would delete the construction post (since it was empty of resources), and then try to walk up to and use the now deleted object.

Though I'm sorry for the crashes, this bug reminded me of the joy that debugging can bring. Often, debugging is done in a hurry, to fix a really urgent bug, which can be a very stressful situation and thus takes a lot away from the fun of it, but this time, I could take my time, enjoy it and do it thoroughly. And thoroughly, indeed, it had to be done, seeing how the faulty code path crossed two different stacks and switched between them (using libc's ucontext functions). It isn't every day that I have to look through obscure system data structures describing processor state and walking through a stack manually with a memory examiner and print-out of the assembly dump of the program. I recalled another time, when I had to step through a program instruction by instruction to find the place where I was razing malloc fences; I think it took me 8 hours. This time wasn't quite as bad, but in a way, it's almost a little boring how Valgrind makes these sorts of bugs so ridiculously easy to find, so I must thank you guys for using the server so much that I couldn't use Valgrind. :)

Hopefully, this was also the bug that was corrupting the server's malloc arena, causing delayed crashes at shutdown. I can only hope.

Thank you all for triggering these rare bugs. I don't think clicking a construction post like that is an action I'd ever have triggered in solo testing. :)
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: The bliss of debugging

Postby kimya » Mon Jun 08, 2009 12:12 pm

i dont understand a single word but im glad you enjoy it :mrgreen:
kimya
 
Posts: 845
Joined: Mon Jun 01, 2009 1:35 am

Re: The bliss of debugging

Postby sami1337 » Mon Jun 08, 2009 7:38 pm

Now restart the server please. :geek:
The ones who see things differently.

You can praise them, disagree with them, quote them, disbelieve them, glorify or vilify them. About the only thing you can't do is ignore them.
And while some may see them as the crazy ones, we see genius.
User avatar
sami1337
 
Posts: 1125
Joined: Tue May 26, 2009 1:52 pm


Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest