Troubleshooting malfunctioning notes in Mail
Sometimes specific functions in programs will not work properly, if at all. Here we help a reader troubleshoot the notes feature in Mail, which would not show a new note window when activated.
The notes feature in Apple's Mail program can be useful for jotting down quick reminders and other items without having to send yourself e-mails. Though convenient, the feature may not work properly at times, if at all.
We were recently contacted by MacFixIt reader Richard who found that the notes feature stopped working when he migrated to his new MacBook Pro system. Usually when program features like this stop working, the first recommendation is to try refreshing some settings and delete the program's preferences files, but Richard had already done this when he contacted us. Additionally, sometimes there may be settings in various applications that you might not want to lose by removing the preferences file, so if these programs are not working properly you might choose to keep the current settings and troubleshoot them.
Often when programs malfunction, they will crash and generate a report that can help indicate where the problem lies; however, since the program did not crash, no report was generated. Though the lack of a crash report may have some people giving up the troubleshooting effort, there is another place to look for program errors, and that is the system console.
When most applications run, they will output various events to the system console, some of which may be saved in a log file, be it the system log or a dedicated log for the program. These events can be errors, status updates, or other routine events that the program performs as it runs, and you can see these events by opening the Console utility.
In the Console utility, you can read individual log files or recent crash reports for applications if they are available, or you can see the ongoing list of output messages from all programs by choosing the "All Messages" or "Console Messages" category. Even if an error or message from a program is not logged, it will still appear in the system console, so with this utility open you can try the tasks in the problematic program to see if any relevant messages show up.
By using the console in this manner, we were able to figure out the problem. When the Notes button was clicked in Mail, the program would output the following error several times, followed by a stack trace of recent functions Mail had been using:
28/10/2010 16:27:03 Mail *** Assertion failure in +[NoteView updateFontAndRule:], /SourceCache/Mail/Mail-1081/MessageViewer.subproj/NoteView.m:210 font-family cannot be nil
This error was output every time the Notes button in Mail was pressed, which indicated the problem was with the Mail program; however, to double-check you can always check the process ID (PID) associated with the console message against the process ID of the suspected application. In this case, the PID for Mail is 1036, and if you open Activity Monitor you can match it against the number associated with the running Mail program (we did not do this in our troubleshooting, but it is another step you can take).
Now knowing the error is from Mail, in looking at the error we can see that the problem appears to be with how fonts are being handled by the program. For some reason, the NoteView routine is trying to perform the action "updateFontAndRule" and is getting an error because for some reason the font family being sent to the NoteView routine is set to nothing, or "nil".
This indicates that the issue is either with corruption in the fonts that Mail is using, or with how Mail is handling fonts for the Note view. At this point, both checking fonts with Font Book for any errors, as well as checking the "Fonts & Colors" settings in Mail, was recommended.
It turns out that Mail for some reason did not have any font set to be used for notes. The default font is "Marker Felt Thin" at 16-point size, but in this case the font field was empty. This could have happened during the migration to the new machine, or when a third-party application was installed. Either way it makes sense that this was causing the error, which mentioned that the font family being used was "nil."
The easy fix to this problem was to set a new font to use for notes. The font settings should be kept in Mail's preferences file so it is odd that removing this file did not restore the defaults; however, it could be that some other error or setting could have reverted the default font settings.