Thursday Nov 01, 2007

Recover from Mail.app "Loading address book" hang

Mail.app just hung on me a second time after upgrading to Tiger. My first reaction was to force quit the application, but when it came back, it's still hung. Activity Viewer says it's "Loading address book". Perhaps my Address Book is corrupted? Nope, Address Book opens up just fine. Then by coincidence I notice something: when I mouseover the QuickSilver icon in the menubar, the pointer turns into a spinning ball, so maybe they're related, but how do I kill QuickSilver? It's not even showing up in Activity Monitor! Fortunately, I can kill it from Terminal:

~$ ps auxwww | grep Quick
chienr 96 0.0 2.4 226172 37244 ?? S 24Oct07 5:06.22 /Applications/Quicksilver.app/Contents/MacOS/Quicksilver -psn_0_917505
chienr 1832 0.0 0.0 27376 420 p2 S+ 11:21AM 0:00.01 grep Quick
~$ kill 96

After this, Mail.app goes back to normal, and I just relaunch QuickSilver. Problem resolved!

FWIW, I'm using QuickSilver 1.0β51 (Build 3800) and Mail.app 2.1 (752/752.2).

Wednesday Oct 31, 2007

Debugging OS X Mail.app

Below are some commands to capture Mail.app sessions.

In Jaguar the session is recorded in /var/tmp/console.log
In Panther the session is recorded in /Library/Logs/Console/<username>/console.log
In Tiger the session is recorded in /Library/Logs/Console/<username>/console.log

/usr/bin/defaults write com.apple.mail LogActivityOnPort 25
/usr/bin/defaults write com.apple.mail LogActivityOnPort 143
/usr/bin/defaults write com.apple.mail LogActivityOnPort "25,143"

And to disable the logging use this command:

/usr/bin/defaults remove com.apple.mail LogActivityOnPort

Alternately, launch Mail.app in debug mode and send errors to a log file:

/Applications/Mail.app/Contents/MacOS/Mail -LogSocketErrors YES -LogActivityOnHost your.mail.server -LogActivityOnPort 143 &> ~/Desktop/ConnectionLog.txt
Sources http://lists.balius.com/pipermail/mac-users/2005-December/000043.html and
http://developer.apple.com/bugreporter/bugbestpractices.html#Mail


[UPDATE Nov 21, 2007] More debugging options listed on: http://www.macosxhints.com/article.php?story=2004101603285984

About

I currently live in San Francisco Bay Area. For the past seven years, I have been designing and building messaging solutions for Sun.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today