Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

MacMail crashes every time I search

There seem to be some other solutions to mail problems on ML, but does anyone have one for this? Mail works fine except for search. 10.8.1 is no help.


The crash log gives me the following:


Exception Type: EXC_CRASH (SIGABRT)

Exception Codes: 0x0000000000000000, 0x0000000000000000



Application Specific Information:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Fatal error. The database at /Users/mba/Library/Containers/com.apple.mail/Data/Library/Application Support/AddressBook/MailRecents-v4.abcdmr is corrupted. SQLite error code:11, 'database disk image is malformed''

abort() called

terminate called throwing an exception



Does anyone know if I can just delete that corrupted file?

MacBook Pro, OS X Mountain Lion (10.8.1)

Posted on Sep 2, 2012 1:19 AM

Reply
12 replies

Sep 2, 2012 6:36 AM in response to MattieB

You need to delete the Mail "sandbox" folder. Back up all data first. If you don't have at least one complete, current backup, STOP.

Quit Mail. In the Finder, select Go Go to Folder... from the menu bar, copy the text on the line below into the box that opens, and press return:

~/Library/Containers/com.apple.mail

A Finder window should open with a folder selected. If it does, move the selected foldernot just its contents — to the Trash. Relaunch Mail and test.

Caution: If you change any of the contents of the sandbox, but leave the folder itself in place, Mail may crash or not launch at all. Deleting the whole sandbox will cause it to be rebuilt automatically.

Sep 3, 2012 10:19 PM in response to Linc Davis

Thanks so much!


I tried this, but the Finder can't see any file or folder with this name. I tried copying the whole line as you suggested. Nothing. Then I tried tryping in the line starting with ~. It comes up empty on "~/Library/C" and the only /Library results are foreign languages, something called SMART Utility Revision History.rtf and an Uninstall file for TI Connect.


I checked Finder Preferences. It's searching everywhere on this computer and showing everything.


MacMail continues to crash and give the same error message.


Any other ideas?


Why can't finder find that folder?

Sep 3, 2012 10:34 PM in response to MattieB

Hi Mattie,


To start with what email are using meaning Gmail or your compnay mail


Secondly , if gmail are you using it by IMAP or POP connection. If IMAP you can start from scratch.


Anyways first things first. Follow the below procedure to back up your mail data.


Go terminal and type " chflags nohidden ~/Library " without the quotes ,


after this go to home folder > library > copy mail and mail download folder.


then go to preferences folder in the same library and copy com.apple.mail.plist.lockfile and com.apple.MailMigratorService.plist.


After backing up if you email is IMAP based delete your email account and reconfigure.


If POP , based once you have backed up. Select the folders in the Mail App , like inbox , sent items and so on and select rebuild from mailbox menu and rebuild them.


Good luck.

Sep 3, 2012 10:47 PM in response to MattieB

Back up all data if you haven’t already done so. Before proceeding, you must be sure you can restore your system to the state it’s in now.


Launch the Terminal application in any of the following ways:


☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)


☞ In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.


☞ Open LaunchPad. Click Utilities, then Terminal in the page that opens.


Triple-click the line below to select it, then drag or copy into the Terminal window — do not type — and press return:


ls -Odel Library/Containers/com.apple.mail


Post any lines of output that appear below what you entered — the text, please, not a screenshot.

Sep 4, 2012 7:38 AM in response to MattieB

Okay. I just re-read the fine print. I had not been following your instructions correctly. I had just searched in the finder and not used the Go To Folder from the Fo menu. Doing it correctly brought up a file called Container.plist and a folder called Data. I moved Data to the trash, and MacMail wouldn't open at all (with an explanation about not having any data). I tried looking inside the Data folder and deleting the Library folder inside it. MacMail opened but seemed to be prompting me to rebuild all of my email accounts. Since you had not suggested that would happen. I didn't go there, undid the move of the Library folder to the trash and just relaunched mail. It seemed to be rebuilding itself - going through tons of old emails - but the crashing on Search was the same with the same explanation, followed by this:


SQLite error code:11, 'database disk image is malformed''

abort() called

terminate called throwing an exception

Sep 4, 2012 7:42 AM in response to MattieB

Ignore my last post, as I just discovered yours beneath it.


I pasted that command into the Terminal.


Now mail crashes on launch. Seems to be the same error, but now it won't lauch the app:


Exception Type: EXC_CRASH (SIGABRT)

Exception Codes: 0x0000000000000000, 0x0000000000000000



Application Specific Information:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Fatal error. The database at /Users/mbardin/Library/Containers/com.apple.mail/Data/Library/Application Support/AddressBook/MailRecents-v4.abcdmr is corrupted. SQLite error code:11, 'database disk image is malformed''

abort() called

terminate called throwing an exception

Sep 4, 2012 11:32 AM in response to Linc Davis

Yayyyy!!!


Pretty sure that did it. Looks like there's a rebuilt file in that folder.


I can't tell you what a relief it is to be able to use the lovely, new search tools.


I hope Apple is paying you and you got stock options ten years ago.


If not, you are some kind of tech-saint.


Either way, I really appreciate your persistence and patience.


Thank you.

MacMail crashes every time I search

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.