Archive for the ‘Mac OS X’ Category

Mail.app crashes on startup after Exchange settings update

Tuesday, December 18th, 2007

OK, this is one of those problems that come up only if you do something silly or simply something really unusual.

Basically, I experienced a terrible situation today when my Leopard Mail.app refused to work. It was crashing all the time even before the window would appear on the screen and a standard Relauch/Ignore dialog box was popping up all the time. This is one the error messages I found in Console which is a built in application and can be found under /Applications/Utilities:

18/12/2007 11:12:16 Mail[167] *** Assertion failure in -[LibraryToDo mailboxUid], /SourceCache/Message/Message-915/Library.subproj/LibraryToDo.m:205
18/12/2007 11:12:16 Mail[167] An uncaught exception was raised

18/12/2007 11:12:16 Mail[167] Mailbox UID is not set
Stack Trace: (
(
2530345579, 2474053787, 2530345035, 2462609636, 4844373, 3408319, 4829155, 2461484666, 2529720906, 2529721635, 2461473392, 13228, 4990192, 3024109, 2530368413, 2530366856, 3999207, 2461487181, 2461486068, 2472796277, 2472795954
))
18/12/2007 11:12:16 Mail[167] *** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘Mailbox UID is not set’
18/12/2007 11:12:16 Mail[167] Stack: (
2530345579, 2474053787, 2530345035, 2462609636, 4844373, 3408319, 4829155, 2461484666, 2529720906, 2529721635, 2461473392, 13228, 4990192, 3024109, 2530368413, 2530366856, 3999207, 2461487181, 2461486068, 2472796277, 2472795954
)

The first question is: what might have caused that? And the answer is: a recent update of my Exchange email account settings in Mail.

Last night I was VPNing to my office network and I was forced to replace the Exchange server hostnames with raw IP addresses (under Mail Preferences -> Accounts -> Incoming and Outgoing Mail Server) because for some reason my computer stopped resolving them and was not able to send and receive messages anymore. And when I got to the office today and tried to access my email, the application started crashing.

Solution
As I wasn’t able to access Mail and restore the previous Exchange settings I decided to create a new Mac OS X user account in order to temporarily replace my corrupt ~/Library/Mail settings with a fresh bunch of files. I backed this directory up and after sorting out the permissions I grabbed the files from /Users/NEWLY_CREATED_ACCOUNT/Library/Mail and dropped them under ~/Library/Mail. Then I tried firing Mail up and this time it did not crash. I fixed the the Exchange settings, restored the original, backed-up copy of ~/Library/Mail, restarted the Application and could see everything up and running again.

The moral of the story is “don’t give up when Mail doesn’t want to start” :-) Just create a new user account, replace the Library settings and start the process from there. I don’t know if there is any other way (other than the one with the updated Exchange settings) of making Mail crash but if there was one, going this route might be a good way of restoring your email without even thinking about reinstalling the system or anything as severe as that.

DVD Player “skipping over damaged area” problem on Mac OS X Leopard

Sunday, December 2nd, 2007

I bought a new Sigur Ros DVD the other day and after inserting it to the drive DVD Player would display a “skipping over damaged area” message in the top left corner of the screen and refuse to play the film. The menu would also not be clickable but I would still hear the background sound. After some googling I found out that other people also experienced similar issues on Leopard. It looks like there is no fix for it at the moment and the only thing you can do is installing other software. I picked a well known VLC player and all have been working fine since then.

Capture Unix top command output into a file

Wednesday, November 21st, 2007

Firstly, you need to make sure that your top command does not redisplay the output. This is what you do on Linux and Mac OS:

Linux:

$ top -b -n 1

Mac OS X:

$ top -l 1

(Note that the first sample displayed will have an invalid %CPU displayed for each process, as it is calculated using the delta between samples. (from the top manual))

You can use a standart Unix command in order to save the details to a file:

$ top -b -n 1 > my_top_report.txt

All application windows from all Spaces on your Mac Leopard screen

Monday, November 19th, 2007

Those of you who had pleasure to work on Mac OS X Tiger must have come across an Expose’s F9 keyboard shortcut that basically displays thumbnails of all the open windows on your desktop. Now, on Mac OS X Leopard you have a new application called Spaces that manages your virtual desktops and if you want to see all your “spaces”, you just hit F8. But what if you want to be able to see all the windows from ALL of your virtual desktops? Just hit F8 and then F9 and… that’s it :-)