Search Unity

Bug Error: The process cannot access the file because it is being used by another process.

Discussion in '2022.1 Alpha' started by mishakozlov74, Sep 24, 2021.

  1. mishakozlov74

    mishakozlov74

    Joined:
    Aug 8, 2018
    Posts:
    85
    From time to time, after building scripts I get this error. I didn't have it before, probably it's this related to this alpha?

    upload_2021-9-24_19-17-31.png

    If you want me to provide any additional information, just let me know.
     
  2. mishakozlov74

    mishakozlov74

    Joined:
    Aug 8, 2018
    Posts:
    85
    I have to mention that this error cannot be "cleared", I have to restart the editor every time it occurs.
     
  3. RippStudwell

    RippStudwell

    Joined:
    May 16, 2017
    Posts:
    1
    I also frequently experience this problem in Unity 2020.3.3f1 using Visual Studio 2019. The file that becomes locked is seemingly random and when I do a powershell search for processes locking the file- Unity is the only process shown. So probably a thread or child process that didn't properly release its' lock I'd guess.

    The only fix is to restart Unity. Happens multiple times a day. 10-15 min to re-open Unity each time. Wild.
     
  4. mishakozlov74

    mishakozlov74

    Joined:
    Aug 8, 2018
    Posts:
    85
    Yep. Do you use burst?
     
  5. runner78

    runner78

    Joined:
    Mar 14, 2015
    Posts:
    422
    I had similar problems outside of unity. This can often also be done with windows indexer lock files.
     
    mishakozlov74 likes this.
unityunity