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. 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. 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. 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 (51)

  1. 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.