Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug 2020.2.0b2: Cannot open any projects (Failed to load window layout)

Discussion in '2020.2 Beta' started by Hyp-X, Sep 10, 2020.

  1. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    421
    Hi,

    Ever since I installed 2020.2.0b2 I cannot open even empty projects in either beta1 or beta2.

    It get this dialog:
    upload_2020-9-10_13-39-8.png

    If I choose Load Default Layout I get back to this dialog.
    If I choose Revert Factory Settings then I get a dialog with Continue, after that I get back to this dialog.
    Only quit works.

    This happens at the end of project creation with both beta1 or beta2.

    Editor.log contains the following error:

    Code (CSharp):
    1. [LAYOUT] About to load Library/CurrentLayout-default.dwlt, keepMainWindow=False
    2. Failed to load window layout: System.NullReferenceException: Object reference not set to an instance of an object
    3.   at UnityEditor.ContainerWindow.GetWindowID () [0x00070] in <3d7c86b365634083bceadac5c7f36490>:0
    4.   at UnityEditor.ContainerWindow.get_windowID () [0x00010] in <3d7c86b365634083bceadac5c7f36490>:0
    5.   at UnityEditor.ContainerWindow.SaveGeometry () [0x00001] in <3d7c86b365634083bceadac5c7f36490>:0
    6.   at UnityEditor.ContainerWindow.Save () [0x0000d] in <3d7c86b365634083bceadac5c7f36490>:0
    7.   at UnityEditor.ContainerWindow.Close () [0x00001] in <3d7c86b365634083bceadac5c7f36490>:0
    8.   at UnityEditor.WindowLayout.LoadWindowLayout (System.String path, System.Boolean newProjectLayoutWasCreated, System.Boolean setLastLoadedLayoutName, System.Boolean keepMainWindow) [0x00207] in <3d7c86b365634083bceadac5c7f36490>:0
    9.  
    Any pointers?
     
    crashie204 likes this.
  2. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    421
    I just saw a similar thread about beta1.
    Except that solution doesn't work for me because I couldn't find any projects that I can open so far.
     
    crashie204 likes this.
  3. Deleted User

    Deleted User

    Guest

    In your project directory, find "CurrentLayout-default.dwlt" and delete it, then try loading the project.
     
    Amazingik and crashie204 like this.
  4. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    421
    Deleting didn't work.
    What worked is creating an empty project in 2020.1.4f1 and copying the file from there.

    What is interesting that after that I can start the project even after deleting the damn file.
    Successfully starting it once changed something somewhere (probably the registry I think that is where saved layouts are stored)
     
    crashie204 likes this.
  5. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,510
  6. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    421
    Ok I just got to the point of that thread:

    If you load a project with a corrupt CurrentLayout, Unity overwrites the c:\Users\<user>AppData\Roaming\Unity\Editor-5.x\Preferences\Layouts\default\LastLayout.dwlt file before it prompts you the above message.

    If you delete your CurrentLayout, Unity will first load the corrupted LastLayout file.

    BUT

    If you press [Load Default Layout] it replaces the file with the CurrentLayout file with a correct(!) default layout file,
    than it is STILL UNABLE TO LOAD it.

    So what you should do as a workaround:

    1. Press [Load Default Layout]
    2. Unity complains that it still cannot load the layout
    3. Copy the now correct CurrentLayout-default.dwlt somewhere
    4. Press Quit
    5. Unity corrupts the file during quitting
    6. Copy back the correct CurrentLayout-default.dwlt
    7. Start Unity again
     
    neczka, iLyxa3D, bullscg0502 and 15 others like this.
  7. elJoel

    elJoel

    Joined:
    Sep 7, 2016
    Posts:
    125
    Oh nice doing what you suggested with "Library/CurrentLayout-default.dwlt" did the trick.
     
    crashie204 likes this.
  8. NotaNaN

    NotaNaN

    Joined:
    Dec 14, 2018
    Posts:
    325
    Nice! Thanks for helping me get back into my project. :p

    Cheers for the bug getting fixed soon. :D
     
    crashie204 likes this.
  9. Acco-san

    Acco-san

    Joined:
    Sep 14, 2020
    Posts:
    1
    Thanks! That's fixed my project.
     
    crashie204 likes this.
  10. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,127