I tried to find a less … alarmist tone to take in the title, but when I think of the consequences of this particular bug, I can’t see that I’m going over the top.
Quite simply, occasionally Windows 7 Explorer will corrupt files when you copy and/or move them using drag/drop. [So far, I’ve only seen this twice, and each time, I was moving MP3 files]
Last night, I dragged a group of files – over a thousand, totaling about 45GB of data, to move them to a network server.
This morning, one of the files was still on the original source. And on the destination.
That alone would be an unsettling bug, but not too much to worry about.
Out of sheer curiosity, I compared the two files (using “FC /B C:File1 Y:File1”).
Sure enough, although the beginning of the file was the same, starting at byte 0x480000 (there may be one too few, or one too many, zeroes there), the target file consisted of nothing other than nulls (zero byte, ‘’ if you’re a C developer).
This doesn’t only happen on files sent to the network, however.
Searching for files with large numbers of nulls at their end, I was shocked to find that over thirty of the files on my hard drive consisted of nothing but null characters. All these files were dated July 27 2009, so clearly that was a bad day for my computer.
That’s unsettling, because these particular files I had assumed to be safely moved. I had first copy-dragged them to my Podcasts folder, and then move-dragged them to a different folder, both of which actions were on my hard drive only. Having listened to these files out of my Zune (using the Podcasts trick I referred to earlier), I wiped them from the Podcasts folder, and now won’t be able to listen again, because the ‘backup’ copy is corrupted.
Mind you, they do compress well when there’s nothing in the file but nulls. :)
And, just in case anyone’s thinking my system itself is corrupt, or has a bad disk driver or something like that, I should note that I have completely wiped and reinstalled the system from scratch in the last few months, so the first (major) destruction of data was on a Windows 7 installation that was upgraded from Vista, and which had a number of the laptop manufacturer’s drivers on it; the second (less huge) destruction was on a fresh Windows 7 installation with almost no manufacturer’s drivers loaded.
I have yet to find any details of others experiencing this same problem. If you want to scan your own files (MP3 or otherwise) for vast quantities of null bytes at the end, I’ve uploaded the program here – it’s written in C#, and I’ve provided the source code as FindNulls.cs, and the executable as FindNulls.exe in the zip file. I won’t claim it’s a sample, or that it’s particularly good, but it will find files that end with several nulls in sequence.