Every now and then, some application (usually TextEdit) starts showing dialogs like this when I try to close or save any document:
The document “2.txt” could not be autosaved.
Your changes will not be saved until the problem is resolved. You can also duplicate the document or discard your changes to close it.
I'll have to quit and reopen the application in order to save anything again.
- I have disabled both Resume and locking files automatically in System Preferences
- The files have usually been in normal folders under my home folder and there hasn't been anything special about them as far as I can tell
- I have tried repairing permissions
- TextEdit's code signature is valid
system.log usually has usually contained messages like this:
5/8/12 9:04:01.358 PM [0x0-0x17b17b].com.apple.TextEdit: [ERROR] GSLibrary.c:_AddGenerationInternal:393 Failed to consume sandbox extension; error 12 (Cannot allocate memory)
5/8/12 9:04:01.361 PM TextEdit: NSFileVersion tried to tried to add a new generation and failed. Versioned file URL: file://localhost/Users/lauri/Notes/2.txt, contents URL: file://localhost/Users/lauri/Notes/2.txt, error: Error Domain=GSLibraryErrorDomain Code=1 "The operation couldn’t be completed. (GSLibraryErrorDomain error 1.)" UserInfo=0x10b24d070 {}
5/8/12 9:04:01.362 PM TextEdit: NSDocument failed to preserve the old version of a document. Here's the error:
Error Domain=GSLibraryErrorDomain Code=1 "The operation couldn’t be completed. (GSLibraryErrorDomain error 1.)" UserInfo=0x10b24d070 {}
Failed to consume sandbox extension; error 12 (Cannot allocate memory)
? Does anyone know what's going on here?
Edit: I haven't seen those errors after I replaced TextEdit with TextEditPlus. It's based on TextEdit's source code but it disables sandboxing and makes a few other changes.