Sunday, May 15, 2005

Thursday, May 12, 2005

Print graph paper of every variety - on demand

Free Online Graph Paper / Grid Paper PDFs

A very clever idea. How subversive. Using PDF and the web, two advanced technologies, to create graph paper for use with pen and pencil.

iPhoto 5.02 crashing fix: reinstall

ExtraBITS

A very methodical dissection of a fairly common bug with Tiger and iPhoto 5.02: failure to start up. This fix was most unusual, remove the pre-installed iPhoto app and reinstall.

Test for corrupt plist files in OS X

Via - The Unofficial Apple Weblog (TUAW)

I was surprised to only learn this maintenance tip now, especially because pref file corruption is a relatively common cause of OS X problems. I don't recall this being a part of any of the usual maintenance utilities, yet it's a shell utility that's present in 10.3.9 (at least).

Like all sudo commands you must run it from an administrator account (sudo gives admin users transient superuser/root like powers)
sudo plutil ~/Library/Preferences/*.plist -s
Plutil checks all the preferences inside your User folder for any corruption. The -s handle in the command suppresses any reporting of preferences that check out, so only ones with errors show up.

I would usually delete any pref file that failed this test.

-36 error when syncing iPod in iTunes

-36 error when syncing iPod in iTunes

via Macintouch. This is the iPods "something's wrong but I don't know what" error. The kb article suggests how to investigate.

Wednesday, May 11, 2005

Tiger: fixing Spotlight gone bad

Macintouch- Mac OS X 10.4 Tiger (Part 12)

Spotlight may malfunction with future-creation-dates and if interrupted during initial index building. See note below. I've now decided 10.4.2 is a better bet than 10.4.1.
Jeff Hirsch

I can confirm that there are issues with Spotlight hogging the CPU under certain circumstances. In particular, the mds (metadata) process and mdimport process can eat up a huge chunk of available CPU and RAM. Upwards of 80% at times, causing a very noticeable slowdown on even the fastest of machines.

A quick search for "mds cpu" in the 10.4 Discussions over at Apple shows that a number of users are dealing with the same issue. Here is what I did to fix the problem and some thoughts on possible causes. First the fix:

1) Using the mdutil command-line utility in Terminal, turn off indexing for each of your drives. example:

$ sudo mdutil -i off /Volumes/your_hard_drive_name_1
$ sudo mdutil -i off /Volumes/your_hard_drive_name_2

2) Then use mdutil to remove the indexes from each drive

$ sudo mdutil -E /Volumes/your_hard_drive_name_1
$ sudo mdutil -E /Volumes/your_hard_drive_name_2

3) Physically remove the .Spotlight directories from the root of each drive.

$ cd /
$ sudo rm -fr .Spotlight-V100

(do the same for your second or third drive) BE CAREFUL WITH THAT RM COMMAND! One typo could ruin your day.

4) Use mdutil again to turn indexing back on for each drive

$ sudo mdutil -i on /Volumes/your_hard_drive_name_1
$ sudo mdutil -i on /Volumes/your_hard_drive_name_2

5) Spotlight will now re-index all drives and should behave in a normal fashion. (No longer uses 60%-80% of your CPU)

Finally a couple of quick thoughts on possible causes:

1. My initial indexing process after installing Tiger was interrupted by a couple of reboots I had to do while installing third-party apps. This may have left me with a funky index when Spotlight tried to pick up where it had left off. I suggest letting it fully index your drives before rebooting the machine at all.

2. A few users in the Discussions over at Apple noticed that they had files on their hard drive with modification dates AFTER the current date. i.e. days/months/weeks into the future. These files may have been causing Spotlight to choke as it tried to make sense of a date that hadn't happened yet.

I did a quick search for files modified "after" today and found a handful of them on my hard drive. (A few were dated 2031!) I used the touch command in Terminal to give these proper dates. If you have a lot of these files, you might want to create and Automator script to touch them all for you.

Hope this saves some of you a headache or two.