Bugs here, Bugs there, Bugs are everywhere

So every programmer out there knows them and as more complex your programs get, the more likely you’ll encounter them. But what also happens is, that you often (at least when doing hobby development) don’t catch those bugs since they don’t occure to you, but only happen for other users. And especially with a complex application like the NewtonPlayGround, where there is no real limitation in what to do for the user, it’s hard to catch all those bugs. And exactly such a bug happened yesterday. I’ve released a test-build of my NewtonPlayGround to the maker of NGD for him to test out a problem I’ve found with the new vehicle container in NGD 1.5, but for him the vehicle wouldn’t drive at all, which made me wonder what happened. So after some long search (the code for the NewtonPlayGround is huge, I’m not sure, but maybe it’s the biggest piece of code I’ve ever written) I found out that, when loading the vehicle information from the XML file, I didn’t take care of the local decimal separator and that was the problem. The german decimal separator is the comma, which is different from most other countries in the world (at least those who speak english, as they use a point for that) and to take care of that I usually have a function for getting single values from an XML-node that takes care of the different decimal separators around the globe. But this time (better said “back then”, as I wrote that part of the code months ago) I just forgot to use that function for loading the value for the vehicle’s torque from the XML-node, and that means that the torque would be very small for english users and only right for german users (or those with a comma for decimal separator). And now that really bugs me! This is code that was written some months ago and I never thought there would have been a problem with that small part of the loading code, and that somehow scares me. I hope that there aren’t dozens of such errors left after the release of my PlayGround, which is rather anticipated.

And if we’re already on the thematics of Bugs : There are also bugs in the current release of Newton (1.5 that is), so the NewtonPlayGround won’t be out before a bugfix release for Newton. The main bug that I found out is a problem with the super-sampling of the new vehicle container which makes more complex vehicles (like the truck with the three trailers) bring the application to a crawl. Julio is already on that bug, so I should soon have a beta DLL to test, and then I’m gonna build some new scenes to show off different vehicles.