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. Dismiss Notice

"(Project) is already running" after crash, can't re-open

Discussion in 'Linux' started by Domarius, Mar 27, 2022.

  1. Domarius

    Domarius

    Joined:
    Jan 5, 2013
    Posts:
    99
    Was editing a prefab and did something it didn't like and the Unity editor crashed out. But then I could never open the project from the Unity Hub ever again until I restarted the computer, because it kept saying the project was already open.

    I used htop to find everything with "unity" or my project name, and killed a few processes I thought would be it, but still got the same error until I restarted the computer.

    Does anyone know what process I should be looking for to terminate to allow me to re-open the project again?
     
  2. LukaKotar

    LukaKotar

    Joined:
    Sep 25, 2011
    Posts:
    394
    Try removing the Temp directory from your project. It should be in your project's root folder (e.g., next to the Assets folder).
     
    odumo likes this.
  3. AlfieBooth

    AlfieBooth

    Joined:
    Dec 2, 2013
    Posts:
    31
    I find when this happens that there are quite a few processes flapping about.
    The way that always seems to work for me is something like:

    sudo kill -9 $(pidof Unity)

    usually gets them all...
     
    Pnvanol likes this.
  4. KevinWelton

    KevinWelton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    239
    There should be a file in your project called "Temp/UnityLockFile". If you remove it the issue should go away.

    What happens is Unity creates this file when the project open if it doesn't exist and takes an exclusive lock on it. The lock is released when Unity exists. In the case of a crash, the lock is never freed. So you have to wait for the system to get around to it or just delete the file.

    This is something we could consider doing in our crash handler if you wan to log a bug on it.
     
  5. kittphi

    kittphi

    Joined:
    Feb 17, 2019
    Posts:
    4
  6. thanhle

    thanhle

    Joined:
    May 2, 2013
    Posts:
    162
    Nice !
     
    sfjohansson likes this.
  7. anurag242002

    anurag242002

    Joined:
    Apr 16, 2023
    Posts:
    1
    not working
     
  8. timmy2get

    timmy2get

    Joined:
    Mar 2, 2018
    Posts:
    12
    UnityLockFile actually worked! great!