I’m a calendaring psycho. I live by my calendars. They have to work for me in all places. They have to work well on all of my Macs and my iPhone. They have to work well on my (future) iPad.
Calendaring is nowhere near as ubiquitous as email. While there are efforts to make that story better, it’s not there yet. Today, you get to enjoy the mishmash of interpretive code to drive your day. iCal on Snow Leopard takes the whole thing to a level about as high as it can go these days, but it’s not without its own set of problems.
Since I’m involved in all sorts of testing with calendars, I try to subject myself to the pain. That’s the sacrifice we make for you. Aren’t our lives terrible? I have calendars on Exchange 2007, MobileMe, iCal server on Snow Leopard and subscriptions. Yes, I want all of this work on all of my devices.
Lately I noticed that my iPhone started having issues. Something was hung in the background of the bloody thing. It was easy to conclude that because the phone would have these mysterious pauses with almost every interaction. If you swiped an icon screen it would hang before completing the action. Often it would hang in mid-swipe. Clicking on any icon generated a huge pause. Sometimes the pause was just too much – the phone would kill the process before the app even started. Even my calls suffered more than usual… I would be disconnected or trail off into oblivion while the phone paused on whatever was choking it up.
I decided to investigate. First I worked with Mail. I thought that perhaps there was something going on with the Mail processes that was causing the phone to hang while waiting on a response. I selectively disabled Mail accounts one by one and it had no impact on the phone. I started to disable calendars one by one. When I reached MobileMe, the phone hung while trying to delete calendars from the phone.
A…ha.
I had a prime suspect. I couldn’t even get the phone to disable the MobileMe calendars cleanly. It would often just hang and run the battery down while it said “Turning off calendars” and spinning to death. I had to forcibly power the phone off to get it to respond. Once I even had to reload it from scratch. Once the phone encountered those MobileMe calendars though, it was all over… again.
After a week of struggling with this and opening a case with Apple, I started to think something was just hosed on MobileMe itself. I went to iCal on one of my Macbook Pros to begin the process of backing the calendar up and removing it.
That’s when I noticed iCal was having significant performance issues as well. Now I don’t know how long iCal had been acting this way. It occurs to me that it had been acting up for quite some time and I just didn’t think much of it since I have an absolute metric crapton of data in the app. I didn’t think much of it. But it was quite evident that iCal was choking on something. When I clicked on an arrow to move forward or backward a week it would pause before displaying anything. Odd.
I started to examine the individual events on one of the MobileMe calendars and discovered something quite unusual. Each event had 9 alarms on it. 9 alarms. What. The. Hell? To troubleshoot, I started removing the alarms one by one on each event. Afterwards, I turned the MobileMe calendars back on the iPhone and it was happy again.
For a week.
The problem resurfaced all over again the next week. The iPhone started pausing. iCal started choking. Once again I examined the MobileMe calendar and… sonuvabitch. That stupid calendar had duplicated the alarms again.
Of course I hit the God of Google to understand what’s going on here. Unfortunately the search produced very little in the way of answers. It did produce a utility, which is what this post is really about. A sweet little outfit named BusyMac offers a free utility called iCal Cleaner. Apparently this problem is common enough that it has to have its own app. It would appear that it’s not totally a MobileMe issue. Rather, this is an artifact produced by many devices touching your calendars.

Archive your calendar first!
iCal Cleaner saved the day. All you have to do is start it up and choose from any one of its very useful tasks. In my case, I asked it to remove duplicate alarms from all calendars. It did this by modifying the local copies of ICS files attached to the calendar. On the next sync, those changes are put into that mysterious Truth Database or whatthehellever and it was all joy.
iCal Cleaner does modify data and it will warn you that you should indeed back up your calendar before proceeding. To do that, open iCal and choose “File –> Export –> iCal Archive.” I love to do this periodically anyway. I save the resulting .icbu file in “~/Documents/iCal Backups.”

iCal Cleaner is your friend
Presuming you downloaded the app from the link above and dropped it in your Applications folder like everything else you install, it’s time to actually perform the surgery. Open iCal Cleaner. You’ll find that you can select all of your calendars or just a single calendar to perform operations. There’s also a wealth of fabulous operations to conduct against your ailing calendar.
iCal Cleaner works against calendars that you control. That means you can run iCal Cleaner against your own MobileMe calendar or an iCal Server calendar. It will not work against a subscribed calendar. This makes sense because you don’t really want to alter a local copy of someone else’s calendar.
So how am I stopping this from happening again? Not sure yet. All I know is that something makes these duplicate alarms occur and it happens often enough that someone made a utility for it. I don’t want to single out MobileMe as the source of all of my pain, but it does seem that syncing calendars can build up and bite you over time. It’s worth noting that the duplicate alarms were also appearing on my iCal Server calendars, but I’ve not been able to reproduce the issue since cleaning it up. MobileMe on the other hand has choked like this more than once.
For now I’ve deleted my MobileMe calendars and moved all of my stuff (personal and otherwise) into iCal Server. This posed another problem with publishing calendars and seeing them on mobile devices. For example, I subscribed to my wife’s MobileMe “Home” calendar and she subscribed to mine. That doesn’t appear to be a good workflow, however. I decided to move our calendars into iCal Server and employ delegation. But how do you get delegation to work on a mobile device?
Ah, I can’t tell you that right now – for that, my friends, is another post for another day… very soon.
Blabber back