Search Issue Tracker

Fixed in 2021.1.X

Fixed in 2019.4.X, 2020.1.X, 2020.2.X

Votes

58

Found in

2020.1

2020.2

Issue ID

1275270

Regression

Yes

[window layout] cannot load editor layout, stuck in infinite loop of "failed to load window layout"

Window management

-

steps to repro:
1a. copy the attached "corrupted" LastLayout.dwlt into ~/Library/Preferences/Unity/Editor-5.x/Layouts/default/ (or win/linux equivalent directory)
1b. create a new project via Unity hub

Expected: project is created and opens (and... revert factory settings / load default layout buttons fix the issue and Unity opens)
Actual: project is created but then a dialog appears and user is stuck in infinite loop that can only be stopped by selecting "quit"

repro: 2020.2.0a21, 2020.1.5f1
no repro: 2019.4.6f1

Note:
- found on MacOS
- "Failed to load window layout" window causes user to be caught in an infinite loop since nothing fixes the issue so the window will stay
- 2019.4.6f1 can successfully open with the "corrupted" LastLayout.dwlt but does show console errors

Workaround:
- try moving or deleting the files at
- ~/Library/Preferences/Unity/Editor-5.x/Layouts/default/LastLayout.dwlt (or equivalent path)
- <PROJECT>/Library/CurrentLayout-default.dwlt

  1. Response avatar

    Resolution Note (fix version 2021.1):

    You can resolve this issue by upgrading to the appropriate fixed version:
    - 2021.1.0a5
    - 2020.2.0b12
    - 2020.1.14f1

    What has changed?
    - “Failed to load window layout” popup dialog now displays the error that occurred when loading the layout.
    - Choosing “quit” will remove the broken layout from the cache.
    - Choosing “Load default layout” or “revert factory settings” no longer results in an infinite loop with “Failed to load window layout”
- A console error will indicate why Unity failed to load the window layout - this can be cleared.

  2. Response avatar

    Resolution Note (fix version 2020.2):

    Tested fixed in 2020.2.0b12

    Unity no longer creates an infinite loop of popup dialogs when attempting to load an invalid or corrupted layout.

  3. Response avatar

    Resolution Note (fix version 2020.1):

    Tested fixed in 2020.1.14f1

    Unity no longer creates an infinite loop of popup dialogs when attempting to load an invalid or corrupted layout.

Comments (43)

  1. 58c9ee7dd617d77c092258b1f4e8910c?d=mm

    Breathing

    Sep 10, 2020 16:39

    Same problem. Can't open the unity editor. :(
    Windows 10, 2020.1.4f

  2. 6b54364f11ac3d278c7fd621ac44508a?d=mm

    scottjdaley

    Sep 05, 2020 00:45

    I was finally able to open unity by replacing the contents of "Library\CurrentLayout-default.dwlt" (inside the project folder) with the contents of "AppData\Roaming\Unity\Editor-5.x\Preferences\Layouts\default\Default.wlt".

  3. 6b54364f11ac3d278c7fd621ac44508a?d=mm

    scottjdaley

    Sep 05, 2020 00:00

    I'm experiencing the same problem on Windows (2020.2.0a21 and 2020.2.0b1). However, I have been unable to find a workaround. Deleting LastLayout.dwlt and reverting to factory default settings did not help.

    From Editor.log:

    [MODES] Loading mode Default (0) for mode-current-id-Dummy
    [LAYOUT] About to load Library/CurrentLayout-default.dwlt, keepMainWindow=False
    Failed to load window layout: System.NullReferenceException: Object reference not set to an instance of an object
    at UnityEditor.ContainerWindow.GetWindowID () [0x00070] in <21b2c32fceb84be48b4ad9068cc533dd>:0
    at UnityEditor.ContainerWindow.get_windowID () [0x00010] in <21b2c32fceb84be48b4ad9068cc533dd>:0
    at UnityEditor.ContainerWindow.SaveGeometry () [0x00001] in <21b2c32fceb84be48b4ad9068cc533dd>:0
    at UnityEditor.ContainerWindow.Save () [0x0000d] in <21b2c32fceb84be48b4ad9068cc533dd>:0
    at UnityEditor.ContainerWindow.Close () [0x00001] in <21b2c32fceb84be48b4ad9068cc533dd>:0
    at UnityEditor.WindowLayout.LoadWindowLayout (System.String path, System.Boolean newProjectLayoutWasCreated, System.Boolean setLastLoadedLayoutName, System.Boolean keepMainWindow) [0x00207] in <21b2c32fceb84be48b4ad9068cc533dd>:0
    UnityEngine.StackTraceUtility:ExtractStackTrace ()
    UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    UnityEngine.Logger:Log (UnityEngine.LogType,object)
    UnityEngine.Debug:LogError (object)
    UnityEditor.WindowLayout:LoadWindowLayout (string,bool,bool,bool)
    UnityEditor.WindowLayout:LoadProjectLayout (bool)
    UnityEditor.WindowLayout:LoadCurrentModeLayout (bool)
    UnityEditor.WindowLayout:LoadDefaultWindowPreferences ()

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.