Just prior to our release (typically!), we found a crash that only occurred with our release build on NT4. 2K was fine. Debug build was fine. Release build instrumented with BugTrapper was fine. Since we develop on Win2K, we somehow hadn't noticed this until pre-release testing.
So, resorting to ATL trace lines and remote debugging, our senior guys narrowed the 'problem' down to one piece of FORTRAN. It is called from C to set a path in a commmon block variable. Prior to storage an attempt is made to trim NULL characters from the end of the string.
Can anyone spot anything intrinsically wrong with the following code, particularly the WHILE loop that strips NULLs:
I will say that the while loop was cribbed from elsewhere in our FORTRAN code where it has worked without problems since time immemorial. Commenting out the WHILE loop eradicated the crash, as did trimming the string in the C++ layer before calling the FORTRAN (the solution we settled on).
It's fixed, but why it was a problem remains a mystery.