This procedure will delete certain temporary and cache files used by system processes. The files are automatically generated and don't contain any of your data. Occasionally they can become corrupt and cause problems such as yours.
Back up all data and read this whole message before doing anything.
Triple-click anywhere in the line below on this page to select it:
/var/folders/zz
Right-click or control-click the highlighted line and select
Services ▹ Reveal in Finder (or just Reveal)
from the contextual menu.* A folder should open with a subfolder named "zz" selected. Move that subfolder to the Trash. You may be prompted for your administrator login password. Restart the computer and empty the Trash.
IMPORTANT: It's been reported a few times that a computer failed to restart after the zz folder was moved to the Trash. If that happens, it means that the operating system is corrupt (and was already corrupt before you moved the folder.) In that case, there's no need to panic. Just reinstall the OS. If the system was upgraded from an older version of OS X, you may need the Apple ID and password you used. If you installed the Java runtime distributed by Apple and still need it, you'll have to reinstall it. The same goes for Xcode. All other data, including all your documents and settings, will be preserved.
*If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. In the Finder, select
Go ▹ Go to Folder...
from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.