May 30th, 2008 • 2:42 pm
Following more prompting from intrigued Betalogue readers after my post about Mac OS X 10.5.3 yesterday, I decided to see if I could try and reproduce the random file renaming bug reliably.
After more experimenting, I think that I am actually able to reproduce it fairly reliably. I am not entirely sure. But I seem to be able to reproduce it most of the time on my machine, and I tried on my wife’s MacBook Pro (which runs Mac OS X 10.5.2), in her user environment, and I got the same result.
Now, this is a dangerous bug, which randomly renames files that are listed in a Spotlight search results window. So in order to reproduce this bug yourself, you might want to create a dummy folder with dummy files, so that you don’t run the risk of damaging valuable files.
Here is the scenario that, on my machines at least, can be used to reliably reproduce the random file renaming, without risking damage to valuable files.
Create a folder called “Test” in your home folder.
With TextEdit, create a text-only file containing the word “George” and save it under the name “Alan.txt” in the “Test” folder.
Still with TextEdit, create another text-only file containing the word “George” and save it under the name “Albert.txt” in the same “Test” folder.
Finally, still with TextEdit, create another text-only file containing the word “George” and save it under the name “Alfred.txt” in the same “Test” folder.
So now you have a folder named “Test” which contains three plain text files named “Alan.txt,” “Albert.txt” and “Alfred.txt,” all of which contain the word “George”:
Now, in a Finder window, select the “Test” folder and type the word “George” in the search field. Then click on the button with the name of the current folder, i.e. “Test,” in order to restrict the search for “George” to the “Test” folder only.
You should have the following three results:
By default, the results are automatically sorted based on the value of their “Last Opened” attribute, i.e. the file that was last opened appears at the top of the list, and then the second last one, and so on. So the exact order of the three files will depend on the order in which you created and saved them earlier on.
Now click on the second item in the list (i.e. “Alfred.txt” in my case) once to select it:
Then click on it twice to open the file in TextEdit. Make sure you don’t click on the file icon, but on the file name. A reader has pointed out that, if you double-click on the file icon, the file name does not become editable.
If you double-click on the file name, however, Mac OS X opens the file in TextEdit, but also makes its name editable in the Finder window in the background, which is the first visual manifestation of this bug:
While in TextEdit, type a letter in the document window for the “Alfred.txt” document that you’ve just opened, then press command-S to save the changes, command-W to close the document, and command-Tab to return to the Finder. (You can also use the mouse for these steps. It shouldn’t make any difference.)
If the bug affects you the same way it affects me, then you’ll get the following alert message:
The exact name of the file that this message refers to might be different, as it seems to depend on the order in which the files are sorted in the search results window.
If it does not work for you with that file, i.e. if you can’t reproduce the bug by selecting and then double-clicking on the second file in the list and doing the other steps, then try the first one or the last one and do the same thing: select it, double-click on it to open it in TextEdit, add a character to it, save it, and return to the Finder.
Upon returning to the Finder, you should get the error message.
Please note that you only get the error message because the file that the Finder is attempting to rename behind your back is in the same folder as the one whose name it wants to use. Since you cannot have two files with the same name in the same folder, you get the error message. But if the two files were in two different folders, Mac OS X would just randomly change the name of the other file without telling you, and there is no way to tell which file it has renamed either.
Now, it is possible that these steps won’t work for you the first time around. Even now, when I repeat the steps on the same files, I sometimes do not get the random renaming, depending on which of the three files I click on, and on the order in which they are sorted in the Spotlight search results window sorted by Last Opened date. (This order keeps changing, of course, since I keep opening the files by double-clicking on them.)
But if you are intrigued by this bug and want to try and reproduce it, I suggest you try at least a few times, with any of the three files, until you get the error message. Hopefully (so to speak!) you’ll be able to reproduce it, and maybe you’ll even be able to fine-tune the scenario and identify one additional requirement that makes it possible to really reproduce it 100% of the time, every time. (I can quite figure it out myself, but I am quite convinced that it involves the changing order of the files in the window.)
Feel free to comment on this post if you can (or cannot) reproduce the bug. And if you feel, like me, that this bug is too serious to remain unaddressed by Apple’s engineers (which is the case so far), then please submit a bug report to Apple which clearly outlines the steps above!