I recently migrated a user from OS X 10.4 to 10.5. When we run Mail.app, it will crash when certain messages are clicked.
I've tried everything I could to get the mail in in a different way -- importing it in different ways, deleting ~/Library/Preferences/com.apple.mail.plist, and re-importing, etc.
It certainly seems that the problem is tied to the individual message, as clicking on a certain message, even if it is in different folders (because of the way it was imported) causes the crash.
Most of the dozen-or-so crash logs start like this:
Process: Mail  Path: /Applications/Mail.app/Contents/MacOS/Mail Identifier: com.apple.mail Version: 3.3 (926.1) Build Info: Mail-9260100~1 Code Type: X86 (Native) Parent Process: launchd  Date/Time: 2009-09-29 10:47:52.713 -0600 OS Version: Mac OS X 10.5.7 (9J61) Report Version: 6 Anonymous UUID: 285B8613-3118-4F91-A28C-BC405D91FAFD Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000089082454 Crashed Thread: 0 Application Specific Information: -[MessageContentController _fetchContentsForMessage:fromStore:withViewingState:]
One entry shows:
Application Specific Information: -[MessageTransfer _synchronouslyPerformTransfer] +[Library synchronouslyUpdateMessageFiles] -[MessageContentController _fetchContentsForMessage:fromStore:withViewingState:]
Do see my comments to the answer(s) below.
I was able to determine which file corresponds to which e-mail. First, I had to figure out where the e-mail folder was. Looking in ~/Library/com.apple.mail.plist helped. (I think running
defaults read com.apple.mail | grep AccountPath
will get that information)
In this case, the folder was analogous to:
I then went to that directory, and issued this command:
grep -r . -e "^From: " -e "^Subject: " -e "^Date: " -m 3 > summary.txt
I then opened the file and searched in it. Searching for the subject makes it easy to see which file the message resides in.
Having done that, I looked at some of the files -- and nothing appears to be amiss to me :(
Update 2 - Ongoing Problem
I had hopes that this only affected older e-mails, but an e-mail received yesterday (Oct 21) also exhibits the problem.
Update 3 - System Log
Curiously, when I opened the console as the user, nothing showed up in the "All Messages" or "Console Messages" section. Here is what I got from tailing the system.log, when I opened Mail, selected a message that would crash it, and repeated the process a second time:
Oct 23 10:01:29 [computer-name] Console: Error: status 2 returned by _asl_server_query Oct 23 10:01:39 [computer-name] ReportCrash: Formulating crash report for process Mail Oct 23 10:01:40 [computer-name] ReportCrash: Saved crashreport to /Users/[user-name]/Library/Logs/CrashReporter/Mail_2009-10-23-100136_[computer-name].crash using uid: 504 gid: 504, euid: 504 egid: 504 Oct 23 10:01:40 [computer-name] com.apple.launchd ([0x0-0x14c14c].com.apple.mail): Exited abnormally: Segmentation fault Oct 23 10:02:01 [computer-name] ReportCrash: Formulating crash report for process Mail Oct 23 10:02:02 [computer-name] ReportCrash: Saved crashreport to /Users/[user-name]/Library/Logs/CrashReporter/Mail_2009-10-23-100159_[computer-name].crash using uid: 504 gid: 504, euid: 504 egid: 504 Oct 23 10:02:02 [computer-name] com.apple.launchd ([0x0-0x150150].com.apple.mail): Exited abnormally: Segmentation fault Oct 23 10:03:02 [computer-name] Console: Error: status 2 returned by _asl_server_query
It occurs to me that there is a slight chance that the data is good and the application (or one of the libraries or frameworks it depends upon) is corrupt. Is there a good way to check? (I could recursively md5sum the whole hard drive, and do that on a machine that has a pristine image, but there would still be a lot of noise in the data, I'm sure.)
I am copying the library folder from the old partition and will try to restore it on a different computer.