FAIL (the browser should render some flash content, not this).

Apple Computer, Inc.Microsoft WindowsLinux

SPECIAL OS X 10.5 SPOTLIGHT SOLUTION

Updated: 12/10/07


Attention all Mac Leopard Users:

As many of you who have upgraded to Leopard know, there are some serious problems with Spotlight. Some users report no problems and it seems to work perfectly, and others are tearing their hair out and even downgrading to Tiger because they have lost their ability to search their hard drives, or Mail, or both. Apple has been no help, and even the 10.5.1 patch has not solved the problem. Apple's solution is basically "Just disable Spotlight until we fix it". Yeah right.

We at Double Exposure Technology Consulting have been working on this problem for weeks, and we have finally come up with a comprehensive solution for all Leopard users. We are going to present the solution here, free. If you need help with anything presented here or any other Leopard installation problems that Apple is not able to help you with, please call us at 1-888-339-8327 and one of our technicians will be ready to assist you for a special flat rate of $25.00 per hour (or fraction) of phone support.

There are two main issues with Spotlight in Leopard:

One, Spotlight is now in control of Mail.app's content searching. Apple did this because Spotlight (when it works properly) is lightning fast. Unfortunately, many people are finding that their "Entire Message" option is GREYED OUT in Mail.app, and therefore unusable.

Two, for many users, Spotlight has put itself into an infinite loop of indexing, rendering the computer unusable until Spotlight is turned completely off. That's right - and Apple's solution to the problem is "turn off the single most important feature of the Finder, or go back to Tiger".

Here are the steps necessary to fix the problem:

When you upgrade from Tiger (or Panther), chances are you took a LOT of fonts with you. Unfortunately, Leopard is even less tolerant of borderline fonts than Tiger is. In the following steps, you need to be very aware of the location of fonts. We're not talking about just the ones installed through FontBook, we're talking about EVERY SINGLE FONT YOU HAVE ON YOUR HARD DRIVE. Here's how you do it:

A) Open Console. Set your view to "All Messages" so you can see every system message that passes through.

B) Make sure you have the root user enabled. If you are not sure, open Directory Utility. Unlock the lock in the lower left corner with your password, then choose "Enable Root User" from the edit menu and assign a password to root. It can be the same password you have for your user account.

C) Open Terminal. Stop Spotlight immediately by typing "sudo mdutil -i off /" - enter your root password to complete the command. This tells Spotlight to immediately stop indexing your drive. If you have additional partitions or drives attached, you need to disable them as well.

D) Navigate to the root directory of your hard drive with the command "cd /".

E) Now erase the Spotlight indexes that have been driving you crazy all this time with the command "sudo rm -rf /.Spotlight*". That's right, you are removing all traces of what Spotlight has done so far to index your drive. Don't worry, when we turn it back on, Spotlight will begin indexing from scratch.

F) Now put the Console window somewhere that you can watch it carefully, and type "sudo mdutil -i on /", followed by "sudo mdutil -E /". These two commands will tell Spotlight to start indexing from scratch.

G) Watch the Console window. Suddenly things are going to be obvious to you. Every time an error from "mdworker" comes up telling you that FontImporter has a validation failure, make note of the directory and the file, and GET RID OF IT. You may need to delete whole directories of fonts to accomplish this. You also may need to repeat steps C-G several times. If any other errors come up that are obviously pointing to a corrupt file, DELETE THE FILE until you get a clean run through of the initial Spotlight indexing without file errors.

H) The last thing for you to look for (at the end of the indexing process) is a set of errors which read like this: "*** Failed to decode x-bit data, treating as binary". These are being generated by Mail.app. In order to fix them, you need to once again turn off Spotlight in step C, and clean up your Mail in the following steps.

NOTE: Some users have discovered that JUST getting a clean run through the indexing will magically fix their eMail problems as well, so the following steps may NOT be necessary. After completing Step H, go to Mail and see if it is working. If not, continue on...

I) Get a backup or second drive. Mount it. Copy the ~/Library/Mail folder from your hard drive to the backup drive, then delete it completely from your real drive, and empty the trash. Disconnect or unmount the backup drive or make sure that Spotlight is set to NOT index it.

J) Load Mail.app, and re-create your mail account(s). We know this is a pain the rear, but it is ABSOLUTELY NECESSARY. Rebuilding the mailboxes will NOT solve the problem. Only starting from scratch will solve this problem.

K) Get some mail into the program, but don't import or copy ANYTHING else yet. Quit out of Mail, and then go through one last clean run of Spotlight with steps D through H. Voila! Those "decode x-bit data" errors will be GONE! Now, keep your fingers crossed, and open Mail. Type a simple search word into the search box. Wait for it....wait for it... in about 30-60 seconds, the "Entire Message" option will magically pop into place. NOW, carefully import old mailboxes one at a time, and make sure that Spotlight is NOT indexing anything but your main hard drive while you do it. If at any time you LOSE the ability to search on "Entire Message", you are probably loading a corrupted set of mail (one message is enough to do it). So watch Console while you perform every action to resurrect your Spotlight functionality!

If you've been driven crazy by this problem, you are going to have a pleasant surprise. As soon as you get a clean run of the initial Spotlight Indexing, it will START WORKING PROPERLY after the first pass. Get this: Even if you have turned off pieces of Spotlight in the preferences section (for example, you told it not to index fonts), every time an error is generated by a corrupt font (or other file), JUST BECAUSE SPOTLIGHT LOOKED AT IT TO DETERMINE WHAT KIND OF FILE IT WAS, the Spotlight index got permanently corrupted and forced it to reindex over and over again. This gets better. When the Spotlight index gets corrupted by ANYTHING ELSE, it will fail to index Mail properly!

We have tested this and found that it solves the problem for MOST users, ugly though it may be. If you are still stuck, call us at 888-339-8327 and we will be happy to assist you further.

Send comments and feedback to: (this address) and we will update this page as necessary to keep up with the problem!