TTNorm Early Abort Bug
While adding music to the Tommy’s Tunes library earlier, the TTNorm program terminated unexpectedly after I’d used it successfully to normalize the volume levels on five CDs worth of WAV files. At least this time, it exited gracefully; unlike a few weeks ago, when it crashed. It doesn’t do it on all WAV files. Only some.
I’ve rebooted the host computer. No luck. The problem persists. So, it’s time to dig into it with the debugger and see what’s going on. I’ll document my progress in the comments below. Work on the DJ Gig: 2009-12-31 effort must stop until this problem is resolved.
December 15th, 2009 at 6:28 am
08:20 AM: I use Winamp, version 5.56 to rip my CDs to the hard drive. Then, I run TTNorm on those files to raise their volumes to maximum. Well, I’m thinking that perhaps this version of Winamp leaves one or more of the files open after ripping is done; it no longer immediately closes them. So, when TTNorm attempts to replace the contents of the original file with the normalized contents, it gets an error from the operating system, saying that the file cannot be written because it is being used by another process. At this, TTNorm aborts. This may be the case. However, I’ll downgrade to Winamp 5.55, where I never experienced the problem and see if this behavior goes away.
One fix would be to change TTNorm so that it writes the output file to a different file name, instead of replacing the contents of the original file.
Another “work-around” would be to exit Winamp after I rip a CD and before I run TTNorm. This would close any and all files that Winamp may have left open after ripping. However, further testing reveals that exiting Winamp does not always make the WAV files writable. So, Winamp may not be the culprit.
I’m considering the options now, though I’m reluctant to change the TTNorm code, because I have close to twenty five CDs to rip in the next couple weeks, and so I can’t afford any big delays. Therefore, I’ll just exit Winamp after ripping each CD as a work-around. Then, in January, 2010, once the heat is off, I’ll investigate a more permanent software solution.
09:40 AM: One other change I made just after upgrading to Winamp 5.56, was to install Avast Antivirus. It’s possible that Avast is holding these files open, and not Winamp. Investigating that, now.
09:45 AM: Downgraded to Winamp 5.55, and restarted the computer. Some locked WAV files were still present. So, Winamp is likely not the program that is holding these files open.
09:50 AM: I’ve disabled Avast. Now, I’ll rip a few CDs to see if TTNorm encounters any more locked files.
10:27 AM: Upgraded once again, back to Winamp 5.56.
10:56 AM: Processed Promo Only’s 2009-10 issue of the Urban Radio series through the TTNorm program. No early aborts encountered. I have all Avast resident providers disabled currently.
9:30 PM: Also, the Windows Search indexer can lock files. If I’m writing files to one of it’s indexed locations in Winamp, it attempts to re-index them immediately because of the way I have Windows Search configured; to index as soon as possible, any changes. This isn’t a problem with WAV files. But when I’m writing MP3 or MP4 files that have tags, it can take the indexer some time, once it opens the file, release it again once it’s done. So to solve the locked-file problem from this particular source, I just re configured Windows Search not to index my music drives. I don’t need that anyway, as I rely currently on the Media Library search engine built into Winamp, to look up songs in my music library.
December 30th, 2009 at 10:20 pm
This project is done. To minimize the file lock-ups and thus, the early aborts of the TTNorm.exe program, I do the following when I’m working with my music library and Winamp:
* Disable file-scanning virus protection.
* Either turn off Windows Search or configure it so that it’s not indexing the folders where I have the music files I’m working stored.
* Disable the Indexing Service altogether since I’m now using Windows Search.
* Close down all other media player programs such as iTunes, QuickTime, and Windows Media Player.