Get sandboxed applications working again after OS X update
Some programs may not launch completely after you have upgraded to OS X 10.8.3. Here is how to fix the problem.
Apple recently released OS X 10.8.3 along with security updates for past versions of OS X, and while the updates have worked properly for the vast majority of users, a few have reported having the problem that certain programs like Preview and TextEdit now will not run. When the program is opened, in some cases the system prompts users to authenticate and repair the user Library, but after this is done the program simply quits after bouncing in the OS X Dock for a few seconds. In other cases the program may simply crash and generate an error report.
Both TextEdit and Preview are sandboxed programs in OS X, meaning the system isolates them and many of their resources from shared areas that other programs can access. For any sandboxed programs, these resources exist as a mirror in the user's Library directory in a folder called "Containers"; however, if this folder has become inaccessible for some reason then the program may not launch properly or be able to save files or otherwise run as expected.
If this happens, then the system may prompt you to try to repair the container in the Library, but if this is unsuccessful then there are a couple of things you can do to overcome the fault and get the program running again.
First attempt to repair permissions on your user home directory. Some who have experienced this problem have tried unsuccessfully to repair permissions on the boot drive using Disk Utility, but this only tackles global resources like the system folder and some installed applications, and not any user files.
To repair a user's home folder permissions, reboot the system while holding Command-R to load the OS X Recovery HD partition. After selecting your language, choose Terminal from the Utilities menu and enter the command "resetpassword" (all one word) to open the password and account management tool. In here, select your boot drive and choose your user account from the drop-down menu. Then click the Reset button in the section for resetting home folder permissions and ACLs.
When this is done, quit the utility and restart your system to see if the programs will run properly.
If you continue to see problems, then the next step is to clear the container folders for each problematic application. To do this, open the Go menu in the Finder and hold the Option key to reveal the Library option. Select this to open your user Library folder, and then open the Containers folder. In here you will see a listing of folders for each sandboxed application, each of which will be named according to the program's domain, such as "com.apple.Preview" for the Preview application.
While deleting the container folder for each program will force the system to recreate it, the container may include some needed information such as unsaved documents and settings, so do not initially delete the folder directly. Instead, move it to your Desktop or to another safe location outside of the Containers folder, and then launch the corresponding program.
If the program launches properly but you find you are missing an autosaved document or two that you were working on, then you should be able to find the document by opening up the old container and locating the files you need within it. The file structure of the container should mirror your home folder: it should include folders like "Documents," "Movies," and "Music," or at least aliases leading to them.
In this manner, remove the container folders for all problematic programs and you should be able to overcome the warning message that prompts you to repair the library each time the program is launched.