Sync to .mac and keychain problems


My keychain is getting corrupted. This has happened twice today. I do the keychain first aid and repair it but then a little while later, it is bad again.

I did a disk utility repair and fix permissions. nothing significant.

After I fix my keychain, it is empty. So I try and upload it. I have it synced on my .Mac account. But when I go into Preferences->.mac and hit the Sync tab, I get: Unable to login to the .Mac synchronization server. I found a log file in ~/Library/Logs/Sync/dotmacsync.log. It says:

2005-10-01 13:39:45 -0500|Error|.Mac Sync Configuration error encountered while getting new configuration: *** -[NSKeyedUnarchiver initForReadingWithData:]: incomprehensible archive (0xffffffde, 0x4c, 0xffffff8e, 0xffffffe8, 0x13, 0x2d, 0xffffffb7, 0xffffff8a)

I tried trashing various preferences, etc but so far I have not been able to breath life back into it.

Any suggestions would be welcomed
From my home directory (in the terminal) I did this:

find . ! -type d -amin -1 -print 2> /dev/null > /tmp/F2

After letting the machine sit idle for a while, F2 was empty. I then did Preferences->.mac->Sync; got the error message, and quit Preferences. I did the find again and now F2 had about 5 files in it. Some of them were plist files that were trashed. So I moved all the files into ~/OLD (a folder I created). I started Keychain and did the Keychain First Aid (under Keychain Access), picked Repair, and got my keychain back in order.

I then did the sync with .mac. At this point, since all the preferences were gone, it appeared as if I was doing it for the first time. So I was able to pick the option where the .Mac info replaced what was on the local machine.

I hope this isn't too vague. But it all seems to be working at this point.

Maybe this note will help someone else in the future.