Hello, It's 20:30 and I'm after a 6 hour bug hunt of an irritating bug caused by an uninitialized member variable.
In the our previous version we had the next few lines of code:
var aList = new Array;
for (var iDx=0; iDx < nNumOfElements; iDx++)
{
// Some code
aList.nCount = someValue; //This line
}
aList.sort(function(a, b) { return b.nCount - a.nCount ; });
In the last release someone accidentally removed the line with comment. and there was no other initialization of the member variable nCount.
Some of our clients got a "Number expected" exception which is pretty obvious (in retrospect), strangely the error doesn't reproduce with our Q.A. nor 80% of our clients!
How can it be? is there any strict mode that we can run with that will find such pesky bugs? what is the difference between the clients that got the exception and ones that didn't (it's not browser version nor windows version)
(our system runs only on IE6+ in a special container which makes it hard for us to write the code in normal I.D.E.'s we pretty much write it all in notepad ++)
Thanks!