10 Replies Latest reply: Dec 3, 2012 8:33 PM by MPX-4132
MPX-4132 Level 1 Level 1 (0 points)

Ever since Mountain Lion was released, Safari's been crashing constantly, and it happends (extremely clearly), when I open new tabs. It desn't even give an error report or recognized it crashed. I just completely halts. Apps start fast on Mountain Lion, but they crash even faster. Here's the console message it ALWASY produces when it crashes:

 

     12/1/12 1:17:13.043 PM Safari[312]: Received an invalid message from the web process with message ID 323002f

 

And this is a message it's complaining about 98% of the time, I'm assuming it's outdated interface code, please patch this soon, else I'll just use chrome:

 

     12/1/12 1:16:54.485 PM Safari[312]: CGContextClipToRect: invalid context 0x0

 

I'd greatly apreciate it if apple were to add the bug report function from before as well.


iMac (27-inch Mid 2010), OS X Mountain Lion (10.8.2)
  • Linc Davis Level 10 Level 10 (169,550 points)

    Launch the Console 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 Console in the icon grid.

     

    Step 1

     

    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left.

     

    Enter the name of the crashed application or process in the Filter text field. Post the messages from the time of the last crash, if any — the text, please, not a screenshot.

     

    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.

    Please do not indiscriminately dump thousands of lines from the log into a message.

     

    Important: Some private information, such as your name, may appear in the log. Edit it out by search-and-replace in a text editor before posting.

     

    Step 2

     

    Still in the Console window, look under User Diagnostic Reports for crash reports related to the process. The report name starts with the name of the crashed process, and ends with ".crash". Select the most recent report and post the entire contents — again, the text, not a screenshot. In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.) Please don’t post shutdownStall, spin, or hang logs — they're very long and not helpful.

  • MPX-4132 Level 1 Level 1 (0 points)

    This is the console log from when it crashed lastly:

     

    ==============================================================================

    12/2/12 3:02:46.097 PM Safari[20111]: CGContextClipToRect: invalid context 0x0

    12/2/12 3:04:13.886 PM Safari[20111]: CGContextClipToRect: invalid context 0x0

    12/2/12 3:05:33.770 PM Safari[20111]: CGContextClipToRect: invalid context 0x0

    12/2/12 4:50:51.492 PM Safari[20111]: CGContextClipToRect: invalid context 0x0

    12/2/12 4:50:53.851 PM Safari[20111]: CGContextClipToRect: invalid context 0x0

    12/2/12 4:56:36.976 PM Safari[20111]: CGContextClipToRect: invalid context 0x0

    12/2/12 4:56:47.616 PM Safari[20111]: Received an invalid message from the web process with message ID 323002f

    12/2/12 4:56:57.063 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 5:15:38.818 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 5:15:58.785 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 5:33:17.124 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 5:37:08.218 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 5:38:21.644 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 5:38:43.094 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 5:39:24.682 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 5:41:52.462 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 5:42:38.113 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 5:43:05.096 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 5:49:03.675 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 5:49:06.459 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 5:59:19.565 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 6:02:12.795 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 6:02:44.261 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 6:02:46.032 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 6:10:45.238 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 6:10:55.913 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 6:11:24.404 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 6:20:29.977 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 6:21:03.827 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 6:23:32.292 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 6:23:35.225 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 6:23:37.433 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 6:45:07.131 PM Safari[21715]: CGContextClipToRect: invalid context 0x0

    12/2/12 6:45:12.740 PM com.apple.launchd.peruser.501[154]: ([0x0-0x4d04d0].com.apple.Safari[21715]) Exited: Terminated: 15

    12/2/12 6:48:58.634 PM Safari[22079]: unlockFocus called too many times. Called on <ToolbarDownloadsButton: 0x7fa551c4baf0>.

    ==============================================================================

     

    @ The end, I had to terminate the app since it just hang.

     

    There is nothing under the User Diagnostic Reports section, the disclosure triangle toggles but nothing's show.

     

    This is the recent now (since that was the Dec. 2nd):

     

    ==============================================================================

    12/3/12 1:43:01.928 AM Safari[177]: CGContextClipToRect: invalid context 0x0

    12/3/12 1:43:51.906 AM Safari[177]: CGContextClipToRect: invalid context 0x0

    12/3/12 1:54:07.580 AM Safari[177]: CGContextClipToRect: invalid context 0x0

    12/3/12 1:54:08.279 AM Safari[177]: CGContextClipToRect: invalid context 0x0

    12/3/12 1:54:08.539 AM Safari[177]: CGContextClipToRect: invalid context 0x0

    12/3/12 1:54:09.166 AM Safari[177]: CGContextClipToRect: invalid context 0x0

    12/3/12 1:54:09.348 AM Safari[177]: CGContextClipToRect: invalid context 0x0

    12/3/12 1:54:09.924 AM Safari[177]: CGContextClipToRect: invalid context 0x0

    12/3/12 1:54:31.269 AM Safari[177]: CGContextClipToRect: invalid context 0x0

    12/3/12 1:55:18.074 AM Safari[177]: CGContextClipToRect: invalid context 0x0

    12/3/12 3:10:50.618 AM Safari[1725]: CGContextClipToRect: invalid context 0x0

    12/3/12 3:14:56.926 AM Safari[1725]: CGContextClipToRect: invalid context 0x0

    12/3/12 3:17:59.449 AM Safari[1725]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:34:34.272 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:35:50.434 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:39:53.027 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:40:02.455 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:40:33.851 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:40:45.726 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:40:48.254 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:40:48.555 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:40:48.787 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:40:51.484 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:40:52.088 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:40:52.587 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:40:52.834 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:40:53.227 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:41:01.171 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:41:02.047 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:41:02.798 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:41:07.325 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:41:14.632 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:41:16.944 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:41:17.345 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:41:18.179 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:50:41.606 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:51:15.837 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:51:16.506 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:51:17.125 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    12/3/12 12:51:18.447 PM Safari[1499]: CGContextClipToRect: invalid context 0x0

    ==============================================================================

     

    And I just noticed this (the CoreGraphics clip rect error) happens when I close/open a tab, or type in the address bar; -or at least more often.

     

    - Thanks for the help

  • Linc Davis Level 10 Level 10 (169,550 points)

    Please read this whole message before doing anything.

     

    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.

     

    Step 1

     

    The purpose of this step is to determine whether the problem is localized to your user account.

     

    Enable guest logins* and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up guest users” (without the quotes) in the search box. Don't use the Safari-only “Guest User” login created by “Find My Mac.”

     

    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.

     

    Test while logged in as Guest. Same problem?

     

    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.

     

    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.

     

    Step 2

     

    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.

     

    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:

     

    • Shut down your computer, wait 30 seconds, and then hold down the shift key while pressing the power button.
    • When you see the gray Apple logo, release the shift key.
    • If you are prompted to log in, type your password, and then hold down the shift key again as you click Log in.

     

    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.

     

     

    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.

     

    *Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t boot in safe mode.

     

    Test while in safe mode. Same problem?

     

    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

  • MPX-4132 Level 1 Level 1 (0 points)

    The problems disapear in the guest account, but continue in safe mode. I'm assuming it's custom settings, or maybe a plugin. What would you suggest?

     

    -Thanks in advanced.

  • Linc Davis Level 10 Level 10 (169,550 points)

    Select Safari Preferences Extensions from the Safari menu bar. If any extensions are installed, disable them and test.

     

    Select Help Installed Plug-ins from the Safari menu bar. Besides the following, what plugins are listed?

     

    iPhotoPhotocast

    Java

    QuickTime

    Shockwave Flash

    WebKit built-in PDF

  • MPX-4132 Level 1 Level 1 (0 points)

    Problems continue with extensions disabled (tested after quitting and relaunching app), my plugins are:

     

    "LogMeIn Plugin"

    "SharePoint Browser Plug-in"

     

    Don't remember installing that second one...

  • Linc Davis Level 10 Level 10 (169,550 points)

    Read this whole message before doing anything.

     

    Back up all data.

     

    Quit Safari if it’s running. Then select  Force Quit... from the menu bar. A small window will open with a list of running applications. Safari may appear in that list, even though you quit it. If so, select it and press return. Close the window.

     

    Step 1

     

    In the Finder, press the key combination shift-command-A to open the Applications folder. Select the Safari icon in that folder and press the key combination command-I to open the Info window. There’s a checkbox in the Info window labeled Open in 32-bit mode. Uncheck it, if checked. Close the Info window and the Applications folder.

     

    If Adobe Flash Player is installed, select  ▹ System Preferences ▹ Flash Player Advanced and click Delete All. Close the preference pane.

     

    Hold down the option key and select Go Library from the Finder menu bar. Delete the following items from the Library folder (some may not exist):

     

    Caches/com.apple.Safari

    Caches/com.apple.WebKit.PluginProcess

    Caches/Metadata/Safari

    Preferences/com.apple.WebKit.PluginHost.plist

    Preferences/com.apple.WebKit.PluginProcess.plist

    Saved Application State/com.apple.Safari.savedState

     

    Leave the Library folder open. Try Safari again. If it works now, stop here. Close the Library folder.

     

    Step 2

     

    If you still have problems, quit Safari again.

     

    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 icon grid.

     

    Drag or copy — do not type — the following line into the Terminal window, then press return:

     

    rm -fr $TMPDIR../C/com.apple.Safari

     

    Quit Terminal. Launch Safari and test.

     

    Step 3

     

    If Safari still doesn’t work right, quit, go back to the Finder and move the following items from the open Library folder to the Desktop (some may not exist):

     

    Cookies/Cookies.binarycookies

    Internet Plug-Ins

    Preferences/com.apple.Safari.LSSharedFileList.plist

    Preferences/com.apple.Safari.plist

    Preferences/com.apple.Safari.RSS.plist

    Preferences/com.apple.WebFoundation.plist

    PubSub/Database

    Safari

     

    (Note: you are not moving the Safari application. You’re moving a folder named “Safari.”)

     

    Try again. This time Safari should perform normally, but your settings and bookmarks will be lost.

     

    If the issue is still not resolved, quit Safari again and put all the items you moved to the Desktop back where they were, overwriting the newer ones that may have been created in their place. You don’t need to replace the files you deleted in step 1. Stop here and post again.

     

    If Safari is now working normally (apart from the lost settings), look inside the “Safari” folder on the Desktop for a file named “Bookmarks.plist”. Select File Import Bookmarks from the Safari menu bar. Import from that file. Recreate the rest of your Safari settings. You can then delete the items you moved to the Desktop.

     

    Note: This step will remove your Safari Extensions, if any, and their settings. If you choose to restore them, do so one at a time, testing after each step to make sure you haven’t restored the problem.

     

    If you don’t like the results of step 3, you can undo it completely by quitting Safari and restoring the items you moved or deleted in that step from your backup, overwriting any that were created in their place.

  • MPX-4132 Level 1 Level 1 (0 points)

    Safari hasn't crashed yet, but the CoreGraphics error persists.

     

    12/3/12 9:54:23.621 PM Safari[1602]: CGContextClipToRect: invalid context 0x0

     

    Every time I either open or close a tab in Safari.

  • Linc Davis Level 10 Level 10 (169,550 points)

    Log messages are not a problem in themselves. You will find all kinds of scary log messages on any system, even if it's working perfectly. If the crashes don't come back, you're done.

  • MPX-4132 Level 1 Level 1 (0 points)

    Alright, thank you for the help and time.