How can I repair the iCal database?


Recommended Posts

My iCal has been acting funny for a while now. It's still usable but it's really annoying. I'm not sure how to explain it so bear with me...

When I'm viewing the calendar for June and hit the back button to view May, it won't do anything, no hang or freeze. Just nothing.

Then when I hit it again, it skips May and goes right to April. And when I do that, the April calendar shows all the events for April, May, and June overlapped.

I can then hit the forward button and go to May, but same thing, events are overlapped and weird.

I've included pictures;

June

post-38279-1216227869_thumb.png

April

post-38279-1216227349_thumb.png

May

post-38279-1216227340_thumb.png

I'm guessing it's an issue with the iCal database, do you guys have any ideas as to how this can be remedied? I'm also worried that if I don't fix it, it may cause further damage to the database and lose all my information.

Thanks in advance.

Edited by HellScream63
Link to comment
Share on other sites

This probably wont work but have you tried backing ical up (file > backup) and restoring it?

I don't think there is any way to repair ical though

Link to comment
Share on other sites

Yes I did try this once, when I did it somehow broke my dotMac sync. But this was awhile ago. I'll give it another go and see what happens.

OK I just did it. And no.. same problem. :(

Link to comment
Share on other sites

I recall this bug being in iCal a very long time ago... maybe try reinstalling the iCal package? Want me to upload my copy of iCal?

Link to comment
Share on other sites

It looks like the cache of information that iCal reads could possibly be corrupted, luckily we can get iCal to recreate its cache information by clearing the old data.

  1. Open iCal.
  2. We need to back up your iCal information before continuing to prevent any loss of data (although unlikely in this situation, it is always a good idea to create a backup of your data before removing any cache files); to do this just click on File in the menu bar and click on "Back up iCal", and then choose a location and save the backup file.
  3. Now, we will need to quit iCal so that we can remove the cache files; a quick way to do this is by using the Cmd-Q keyboard shortcut, or just click on iCal in the menu bar and click on Quit iCal, whichever you prefer.
  4. Let's go ahed and open the Finder. To make sure that we are in your home folder, either click on your user name in the sidebar, or use the keyboard shortcut Cmd-Shift+H.
  5. Now that we are in your Home folder, we need to navigate to the location where the cache files are stored, so lets go ahead and open the "Library" folder, and then open the "Calendars" folder.
  6. Delete any instances of "Calendar Cache" (including "Calendar Cache~2", etc. should they exist).
  7. Now that we have cleared the caches, you can go ahead and re-open iCal. It will rebuild the cache information when you first launch it, and should hopefully correct the issue at hand.

Give these steps a try and please let us know if it resolves your issue. Have a good day! :)

Edited by Cadium
Link to comment
Share on other sites

I tried deleting the Calendar Cache and the problem is still there. Thanks for the suggestion though.

Maybe I should try reinstalling like Vegetunks said?

EDIT; I noticed another weird thing. I started going back and forth between the months and the problem seemed to have been gone, so I tried quitting/launching iCal and hitting back to May, and it was there again. I am able to replicate this behavior of it seemingly gone, and them returning on the next launch.

Link to comment
Share on other sites

I tried deleting the Calendar Cache and the problem is still there. Thanks for the suggestion though.

Maybe I should try reinstalling like Vegetunks said?

There are a few things that you can try which may remedy this, one of which is removing the preference files for iCal. To do this, first close iCal, and then use the Finder to open up Library and then Preferences and delete "com.apple.iCal.plist" and "iCalExternalSync.plist", then go into the ByHost folder and delete "com.apple.iCal.helper.**********.plist" (the asterisks stand for whatever the physical MAC address is on your computer). Once you have done this, re-perform the actions that I stated in my previous post for deleting the Calendar cache files, then open iCal. This should pretty much reset the application while leaving your calendar data intact (it will, however, reset the day/month views, window size, etc.)

Your second option is booting your Mac in "Safe Boot" mode (which also clears a lot of hidden cache files and resets some of the settings in OS X to their defaults). To do this, restart your Mac and hold down the "Shift" key on the keyboard while it is starting up, you should be presented with the login screen with text in red which says "Safe Boot", from there just log in and then restart the computer. Alternatively, you could try OnyX, which a lot of Mac owners swear by.

Link to comment
Share on other sites

There are a few things that you can try which may remedy this, one of which is removing the preference files for iCal. To do this, first close iCal, and then use the Finder to open up Library and then Preferences and delete "com.apple.iCal.plist" and "iCalExternalSync.plist", then go into the ByHost folder and delete "com.apple.iCal.helper.**********.plist" (the asterisks stand for whatever the physical MAC address is on your computer). Once you have done this, re-perform the actions that I stated in my previous post for deleting the Calendar cache files, then open iCal. This should pretty much reset the application while leaving your calendar data intact (it will, however, reset the day/month views, window size, etc.)

Your second option is booting your Mac in "Safe Boot" mode (which also clears a lot of hidden cache files and resets some of the settings in OS X to their defaults). To do this, restart your Mac and hold down the "Shift" key on the keyboard while it is starting up, you should be presented with the login screen with text in red which says "Safe Boot", from there just log in and then restart the computer. Alternatively, you could try OnyX, which a lot of Mac owners swear by.

The system Library or the Library in my home folder?

There's also com.apple.iCal.helper.plist and com.apple.iCal.AlarmScheduler.plist in my home/Library/Preferences

Link to comment
Share on other sites

What about the com.apple.iCal.helper.plist and com.apple.iCal.AlarmScheduler.plist in my home/Library/Preferences?

EDIT; Also, should anything go in Library/Application Support/iCal

Link to comment
Share on other sites

Yes, you can remove those as well. Please note that removing "com.apple.iCal.AlarmScheduler.plist" will also remove any iCal alarms that you have set up, so if you prefer to keep those as-is, try leaving the file intact.

Link to comment
Share on other sites

I tried removing all the files you said and running Onyx. iCal is still exhibiting the same problems. I'll try Safe Boot later.

Thank you for all your input.

Link to comment
Share on other sites

  • 2 months later...

note everyone...i had the exact same problems start happening in my ical, where a certain month displayed these problems that the original poster here described. i was able to even pinpoint it to a single day that would not display properly, while in the day view the other days around it displayed ok. i backed up ical, exited ical, and deleted these files, and my problem was solved:

- all the Calendar Cache files in home/Library/Calendars

- home/Library/Preferences/com.apple.iCal.plist

- home/Library/Preferences/iCalExternalSync.plist

- home/Library/Preferences/ByHost/com.apple.iCal.helper.************.plist

I did not delete any of the files in the home/Library/Application Support/iCal folder (didn't want to lose alarms or any other data), and thankfully discovered that would have been an unnecessary move!

Thanks Cadium for your advice here...

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.