Search Unity

Bug Infinite loop on Failed to load window layout / Revert All Window Layouts

Discussion in 'Editor & General Support' started by aybe, Sep 5, 2020.

  1. aybe

    aybe

    Joined:
    Feb 20, 2019
    Posts:
    55
    I have 2020.2.0a21 installed, now I've installed 2020.1.4f1 alongside but it doesn't want to launch.

    It is caught in an infinite loop showing these windows:

    Unity_2020-09-05_20-49-09.png

    Unity_2020-09-05_20-49-28.png

    Neither load nor revert do work, only quitting does.

    Thanks
     
  2. RTWarner

    RTWarner

    Joined:
    Feb 4, 2015
    Posts:
    2
    I'm having the same problem.
     
  3. aybe

    aybe

    Joined:
    Feb 20, 2019
    Posts:
    55
    Also, here is the log:

    Code (CSharp):
    1.  
    2. [LAYOUT] About to load Library/CurrentLayout-default.dwlt, keepMainWindow=False
    3. Failed to load window layout: System.NullReferenceException: Object reference not set to an instance of an object
    4.   at UnityEditor.ContainerWindow.GetWindowID () [0x00070] in <3b1af5075b0340cfb428dfcef292b2ea>:0
    5.   at UnityEditor.ContainerWindow.get_windowID () [0x00010] in <3b1af5075b0340cfb428dfcef292b2ea>:0
    6.   at UnityEditor.ContainerWindow.SaveGeometry () [0x00001] in <3b1af5075b0340cfb428dfcef292b2ea>:0
    7.   at UnityEditor.ContainerWindow.Save () [0x0000d] in <3b1af5075b0340cfb428dfcef292b2ea>:0
    8.   at UnityEditor.ContainerWindow.Close () [0x00001] in <3b1af5075b0340cfb428dfcef292b2ea>:0
    9.   at UnityEditor.WindowLayout.LoadWindowLayout (System.String path, System.Boolean newProjectLayoutWasCreated, System.Boolean setLastLoadedLayoutName, System.Boolean keepMainWindow) [0x000ce] in <3b1af5075b0340cfb428dfcef292b2ea>:0
    10. UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    11. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    12. UnityEngine.Logger:Log(LogType, Object)
    13. UnityEngine.Debug:LogError(Object)
    14. UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean, Boolean, Boolean)
    15. UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)
    16. UnityEditor.WindowLayout:LoadDefaultLayout()
    17. UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean, Boolean, Boolean)
    18. UnityEditor.WindowLayout:LoadProjectLayout(Boolean)
    19. UnityEditor.WindowLayout:LoadCurrentModeLayout(Boolean)
    20. UnityEditor.WindowLayout:LoadDefaultWindowPreferences()
    21. (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)
     
  4. aybe

    aybe

    Joined:
    Feb 20, 2019
    Posts:
    55
    Go figure why, the bug isn't occurring anymore, today I have been able to create and load projects :)...
     
  5. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    Are you trying to downgrade a Unity 2020.2.0a21 project to 2020.1? Downgrading projects is generally not supported and you're liable to run into strange issues like this. Especially when the starting version was an alpha.
     
  6. aybe

    aybe

    Joined:
    Feb 20, 2019
    Posts:
    55
    No I didn't, I tried this on a new project.
     
  7. Korveen

    Korveen

    Joined:
    Jan 24, 2015
    Posts:
    12
    Same problem at 2020.1.4f1. During the last successful work with projects, the console knocked out layout errors. next time - infinite loop with this window
     
  8. SamOatesGames

    SamOatesGames

    Joined:
    May 16, 2013
    Posts:
    6
    Happening for me also on 2020.1.4f1.
    Created a new project (URP if that make a difference), fails to load and gets stuck in a loop of 'delete layout'/'failed to load layout'.
     
  9. StartleDan

    StartleDan

    Joined:
    Apr 10, 2017
    Posts:
    11
    I am having the same problem. I tried reinstalling 2020.1.4f1 this had no effect. I have just installed 2020.1.6f1. I I also tried to update to Hub 2.4.0 as well. Nothing made any difference. I still unable to create a new project, as I get stuck in this loop. Any ideas?
     
  10. Korveen

    Korveen

    Joined:
    Jan 24, 2015
    Posts:
    12
    2020.1.6 - can`t create new project. Also infinite loop.
     
  11. StartleDan

    StartleDan

    Joined:
    Apr 10, 2017
    Posts:
    11
    Wow, that's bad. I thought it might just be with new URP projects, So I downloaded one of the new project templates, the FPS microgame one, but that also got stuck in the same loop :(
     
  12. NickVst

    NickVst

    Joined:
    Feb 17, 2017
    Posts:
    25
    Confirming this issue on 2020.1.5f1 .
    • Open up Unity Hub
    • Create a new project with any of the stock or downloaded project types
    • Give the project a name and hit Create
    • Unity goes straight towards Failed to load window layout.
    • None of the options alleviate the issue.
    I'm currently installing 2020.1.6f1 to see if maybe it's a dirty installation thing, but I doubt it.

    Edit: No dice. I feel like there's something wrong as it is; Unity projects seem to take way longer to create/load. Is there maybe a misconfiguration in where they pull the packages from, or is there a problem with the server they pull the packages from? When creating a new project, it takes 20 seconds for it to get past whatever it does with the template, and it takes another 20 seconds for it to complete the "Resolving Packages" task.

    Edit 2: Would like to mention my Unity logs have a similar stack trace. Forums think it's spam, so I pastebinned it here. Also, I was having random NullReferenceExceptions in the Editor in existing projects occasionally. Also had to do with the UI; if I can dig up a stack trace somewhere I'll post it here too.
     
    Last edited: Sep 20, 2020
  13. LostInConfusion

    LostInConfusion

    Joined:
    Sep 10, 2020
    Posts:
    2
    Same issue here. Using 2020.1.4f1 on Linux Mint 20.
     
  14. LostInConfusion

    LostInConfusion

    Joined:
    Sep 10, 2020
    Posts:
    2
    I found a temporary solution that worked. I looked at the end of the log file and noticed that the Editor is saving two separate layout configuration files. I simply removed these and hoped for the best. Now the Editor starts again.
    So try to remove
    ~/.config/unity3d/Preferences/Editor-5.x/Layouts/default/LastLayout.dwlt
    and under you project folder
    [Project folder]/Library/CurrentLayout-default.dwlt
     
  15. NickVst

    NickVst

    Joined:
    Feb 17, 2017
    Posts:
    25
    Wonderful! I didn't need to delete the CurrentLayout-default.dwlt file; only deleting LastLayout.dwlt worked.

    On windows, the path is
    %AppData%\Unity\Editor-5.x\Preferences\Layouts\default
    .

    EDIT: Well, that was short-lived. Same fix doesn't work on my laptop...
     
    Last edited: Sep 21, 2020
  16. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    Found a workaround.

    Go in any other project you have, get the CurrentLayout-default and CurrentMaximizeLayout files from libraries and paste it in the project you just created, that does cause the infinite loop issue.

    That fix the problem for me, although it seems that something is messed up with the default "CurrentLayout-default" file from Unity itself; as I just proven since old versions from a previous project works fine when copied in the new project folder. Hope this helps.
     
    Last edited: Sep 22, 2020
  17. voody2506

    voody2506

    Joined:
    Jun 21, 2018
    Posts:
    17
    This works, thank you!
     
  18. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,276
    Just got this same bug - not fixed?!
    I got it after working on an HDRP project and then trying to start a brand new 'basic' 3D project

    Anyone reported this bug?

    Edit: OK everytime I change the renderpipeline for new project I get this?! omg
     
    Last edited: Sep 23, 2020
  19. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,276
  20. UPlayOnline

    UPlayOnline

    Joined:
    Oct 31, 2014
    Posts:
    8
    For me only worked deleting ALL the layouts in the folder: %AppData%\Unity\Editor-5.x\Preferences\Layouts\default
     
    Siemens_DEV likes this.
  21. Ommageden

    Ommageden

    Joined:
    Sep 24, 2020
    Posts:
    7
    The copying from another projects folder worked for me.
     
  22. jaysonhanlon8

    jaysonhanlon8

    Joined:
    Sep 11, 2020
    Posts:
    3
    Hey, sorry im new to unity, how would this be done? I am on a Mac
     
  23. jaysonhanlon8

    jaysonhanlon8

    Joined:
    Sep 11, 2020
    Posts:
    3
    How were u able to do this? I am on a Mac and kinda lost
     
  24. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,276
    Download 2020.1.8, think fixed
     
  25. iamarvind

    iamarvind

    Joined:
    Oct 9, 2020
    Posts:
    1
    A workaround for this issue:

    1-Go to the root of the Project

    2-Go to Library.

    3-There you find a file named CurrentLayout-default.dwlt open it with
    visual studio.

    4-Now go to UnityHub and open your project.

    5-When the "CANNOT LOAD EDITOR LAYOUT" notification appear click on load
    default

    6-Now go back to visual studio and copy all the code

    7-Then press the "Quit" button

    8-Notice that the code in the visual studio project changed, delete all of
    it.

    9-Finally paste the code that you've copied before and save the project.

    Now go to Unity Hub and try open your project, it should work.
     
    austeria likes this.
  26. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    No need to open the file in VS; you can just copy the template from another project.

    Also seems that the issue has been solved in the latest build of Unity 2020, although many are not updating every other month, when Unity release a new build, so for the ones stuck with an older version of Unity, the only way to fix the issue is to copy the template files from an existing project.
     
  27. anabolicgamer

    anabolicgamer

    Joined:
    Jun 19, 2020
    Posts:
    1


    You will get the solution in this video
     
    omer-hatay0534 likes this.
  28. Garrus03

    Garrus03

    Joined:
    Sep 19, 2019
    Posts:
    1
    This worked for me, thx

    Couldn't find the "CurrentMaximizeLayout" file, but I had only the CurrentLayout-default. Still worked!
     
  29. minchio

    minchio

    Joined:
    Oct 7, 2014
    Posts:
    4
    Currently there is a battle between UE and Unity, the editor with the best bugs wins...
     
    Last edited: Oct 17, 2020
  30. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,276
    Erm tested fixed in 2020.1.8 yet no.
    Copied windows project on disk to new folder. Opened it and same looping bug.
    Quit and opened again - now windows are screwed up and unusable.
    ffs
     
  31. pd9soft

    pd9soft

    Joined:
    Oct 11, 2020
    Posts:
    1
    This error still exists. Fresh unity installation.
     
  32. Boogafreak

    Boogafreak

    Joined:
    Oct 2, 2017
    Posts:
    42
    I've created a procedure to deal with it. Mostly from trial and error from this thread, so I'm on the shoulders of giants..
    It may be a bit of an overkill on some files, but it works for me.

    1. Close Unity Hub (if you have it on).
    2. Delete ALL except Default.dwlt from :
    %AppData%/Roaming/Unity/Editor-5.x/Preferences/Layouts
    3. Delete these 2 files :
    [Project folder]/Library/CurrentLayout-default.dwlt
    [Project folder]/Library/CurrentMaximizeLayout.dwlt

    Hope this helps deal with this.. intolerable issue. :)
     
    Last edited: Oct 25, 2020
  33. zee7

    zee7

    Joined:
    Oct 29, 2020
    Posts:
    1
    This worked for me when all other solutions failed. Thanks much!
     
  34. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    814
    Same issue here. Using 2020.1.4f1, happened after switching from Xbox to PC

    does not fix with any of hte proposed solutions WTF. I just need to send an update of the game now this.
     
    Last edited: Nov 26, 2020
  35. ahmedaniss

    ahmedaniss

    Joined:
    Sep 18, 2019
    Posts:
    98
    problem fixed here :
     
    ngfilms likes this.
  36. Mickai55

    Mickai55

    Joined:
    Mar 29, 2020
    Posts:
    1
    fixed the problem on 2022.2.15.f1 by deleting all content in AppData\Roaming\Unity\Editor-5.x\Preferences\Layouts\current
     
  37. Nobuu-Nakata

    Nobuu-Nakata

    Joined:
    Jul 12, 2012
    Posts:
    3
    This happened to me when I opened a Shader Graph window at maximum size on another project on Unity 2022. Unity tried to open repeatedly the shader graph window but it didn't exist on current project.
     
    Shayke likes this.
  38. Bantichai

    Bantichai

    Joined:
    Nov 6, 2016
    Posts:
    138
    This is the solution that worked for me. All the other solutions don't work for me when using the Unity 2022/2023. Cheers!
     
  39. mat108

    mat108

    Joined:
    Aug 24, 2018
    Posts:
    131
    Running into this error after updating a project from 2020 to 2022. None of the fixes here work and the project is basically unusable. God I love unity.
     
  40. SwayamSahoo2004

    SwayamSahoo2004

    Joined:
    Jan 16, 2022
    Posts:
    1
    This solution worked for me. I am using Unity 2022.3.0f1. Thanks
     
    linenum likes this.
  41. mat108

    mat108

    Joined:
    Aug 24, 2018
    Posts:
    131
    Bump ...
     
  42. coldev2

    coldev2

    Joined:
    Oct 27, 2018
    Posts:
    6
    “Failed to load window layout” Error
    solution 2022.3.6 and above

    • close the unityhub first

    solution +A
    -----
    1. in directory %AppData%
    delete all roaming/unity and roaming/unityhub directories
    ----
    2. in unityhub locate your unity.exe path manually
    ----
    3. delete your library directory in project
    ----
    4.
    load your project backup in unity again
    ----

    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    solution +B
    -----
    1. uninstall unity and unityhub
    -----
    2. in directory %AppData%
    delete all roaming/unity and roaming/unityhub directories
    -----
    3. in programfilesx86 and programfiles
    delete all unity and unityhub directories
    ---
    4.
    install unityhub
    install unity
    ----
    5.
    in your project, delete your library directory

    6.
    load your project again
    ----
     
  43. trooper

    trooper

    Joined:
    Aug 21, 2009
    Posts:
    748
    +1 it's 2023 and we're still dealing with this
     
  44. wulanda

    wulanda

    Joined:
    Feb 7, 2023
    Posts:
    2
    [ProjectName]\UserSettings\Layouts
    replace the layouts from other project
     
  45. wulanda

    wulanda

    Joined:
    Feb 7, 2023
    Posts:
    2
    It's for 2022
     
  46. Ben1977

    Ben1977

    Joined:
    Feb 27, 2013
    Posts:
    8
    2023.1 and the same Problem now with an absolut new 3d oder 2d core from the Comunity hub ... woud you create a 2d oder 3d game ... ok -> boom error


    Respect

    PS:
    renaming the Layouts Folder to Layouts1 solved the Problem ?

    %appdata%\Unity\Editor-5.x\Preferences\
     
    cpmmckeown likes this.
  47. cpmmckeown

    cpmmckeown

    Joined:
    Jan 11, 2023
    Posts:
    1
    Legend. This works a treat!
     
  48. SmellGrows

    SmellGrows

    Joined:
    Mar 28, 2023
    Posts:
    2
    Hey there! If your still experiencing issues with this bug you can easily fix this by pressing the option "Wide" in the layout area. This will change your layout but you can manually put it to the way you desire. I hope this helps you.
     
  49. SmidMarko

    SmidMarko

    Joined:
    Oct 13, 2023
    Posts:
    1
    Also had this problem. The problem was, that I previously opened a project with an older Unity version.

    Solution for me was that I changed the Unity version of my current project after it was created.