Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Bug Disable this Google logging error "Sharing violation" on GvhProjectSettings.xml

Discussion in 'Editor & General Support' started by Domarius, Aug 17, 2022.

  1. Domarius

    Domarius

    Joined:
    Jan 5, 2013
    Posts:
    88
    I need to stop this error randomly occouring each time I run in editor. The rest of my team doesn't know that much about unity so I don't know what setting or plugin they're using that might be causing it. Hoping the following info will be enough to help find out.

    Sharing violation on a settings file that is auto-generated every time anyway. I don't care what I have to disable to get rid of this. It's slowing me down every time I go to run the game.

    Code (csharp):
    1. Unable to write to 'ProjectSettings\GvhProjectSettings.xml' (System.IO.IOException: Sharing violation on path F:\Unity\Projects\DeliveryRush\ProjectSettings\GvhProjectSettings.xml
    2.   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <6073cf49ed704e958b8a66d540dea948>:0
    3.   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) [0x00000] in <6073cf49ed704e958b8a66d540dea948>:0
    4.   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean useAsync) [0x00000] in <6073cf49ed704e958b8a66d540dea948>:0
    5.   at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,bool)
    6.   at System.Xml.XmlWriterSettings.CreateWriter (System.String outputFileName) [0x00051] in <938a03e8c5f34c788591fc3c21d5b34b>:0
    7.   at System.Xml.XmlWriter.Create (System.String outputFileName, System.Xml.XmlWriterSettings settings) [0x0000a] in <938a03e8c5f34c788591fc3c21d5b34b>:0
    8.   at Google.ProjectSettings.Save () [0x000ae] in <3d721d59d99942a585ced249e28ec6ca>:0 , Project settings were not saved!
    9. UnityEngine.Debug:LogError (object)
    10. Google.Logger:Log (string,Google.LogLevel)
    11. Google.ProjectSettings:Save ()
    12. Google.ProjectSettings:SetBool (string,bool,Google.SettingsLocation)
    13. Google.ProjectSettings:SetBool (string,bool)
    14. Google.PackageManagerResolver:set_VerboseLoggingEnabled (bool)
    15. Google.PackageManagerResolver:<PackageManagerResolver>m__25 ()
    16. Google.RunOnMainThread:ExecuteNext ()
    17. Google.RunOnMainThread:<ExecuteAllUnnested>m__12 ()
    18. Google.RunOnMainThread:RunAction (System.Action)
    19. Google.RunOnMainThread:ExecuteAllUnnested (bool)
    20. Google.RunOnMainThread:ExecuteAll ()
    21. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    This is not coming from any of our files, or any .cs files for that matter, so I can't even get to the source of the code and hack out the line that's doing it (yep I'm that desperate).

    I don't have anything accessing the file, I don't have antivirus programs, I don't have it open in a text editor because I have nothing to do with it, I don't use it, I don't know what it is.

    I even removed it from Source control, and deleted it. It gets automatically created again.

    Read only is not checked, as a test I set read only and can produce a similar error every time. (just to do with reading instead of access violation).

    It's worth noting that the other 2 people on the project are not getting this error on their machine.
     
    Last edited: Aug 17, 2022
  2. FlyVC

    FlyVC

    Joined:
    Jan 5, 2020
    Posts:
    22
    I have the same issue, @Domarius did you come across a solution?
     
  3. GadOleg

    GadOleg

    Joined:
    Nov 13, 2019
    Posts:
    42
    I have a similar problem. Didn't solve the problem