Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcode The document "..." could not be saved

Tags:

xcode

save

I use xcode 3.2.4 on snow leopard. Today when I tried to save a file on my project I get an error message saying: The document "nameOfFile.m" could not be saved. I tried reinstalling xcode but no luck. The file can be edited with other editors and I see the same behavior on all my projects as well as newly created projects. Any ideas?

Screenshot for error warning

like image 711
thomdask Avatar asked Nov 03 '10 16:11

thomdask


1 Answers

We were having this problem in a lab environment where user files are mounted via NFS. The client machines are running OS X 10.6.7 and the file server is running Debian Linux. After much grief and reading /var/log/syslog on the client machine I discovered it was a subtle file locking / race condition issue with the file system. Evidently, when editing files in a "bundle" (e.g. as in an Xcode project), the OS is using some form of "safe writes" which involves writing transient data atomically to ~/Library/Caches/TemporaryItems/ (which of course is on the NFS mounted system) -- there is a race here that requires proper file locking. We hope we have fixed the problem by changing the nfs_mount options as described in Mounting NFS volumes in OS X

like image 90
Wayne Cochran Avatar answered Sep 21 '22 00:09

Wayne Cochran