Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOException: Sharing violation on path .../project.pbxproj #2

Open
frarees opened this issue Dec 18, 2012 · 3 comments
Open

IOException: Sharing violation on path .../project.pbxproj #2

frarees opened this issue Dec 18, 2012 · 3 comments

Comments

@frarees
Copy link

frarees commented Dec 18, 2012

After a standard iOS build, there's a chance I get this exception.

Stacktrace:

IOException: Sharing violation on path /Users/frarees/Desktop/sandbox/Unity-iPhone.xcodeproj/project.pbxproj
System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.IO/FileStream.cs:320)
System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share)
(wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.IO/StreamWriter.cs:124)
System.IO.StreamWriter..ctor (System.String path, Boolean append)
(wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
System.IO.File.CreateText (System.String path) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.IO/File.cs:159)
UnityEditor.XCodeEditor.XCProject.Save () (at Assets/Editor/XCodeEditor/XCProject.cs:958)
XCodePostProcess.OnPostProcessBuild (BuildTarget target, System.String path) (at Assets/Editor/XCodePostProcess.cs:21)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

I suppose this is due to Xcode being launched (pbxproj is being read) while it's still writing on Xcode files.

@dcariola
Copy link
Owner

Well... yes, I think your issue is due an access to the already open file. It never happen to me, and Unity should call xcode only after the postprocess events are complete. What unity and xcode version are you on?

@frarees
Copy link
Author

frarees commented Dec 18, 2012

Latest (Unity Pro 4.0.0f7 & Xcode 4.5.2)

@dcariola
Copy link
Owner

I still not have tested it on Unity 4, as I'm still on 3.5 until some projects get completed. I'll give it a try soon, maybe there are some different behaviours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants