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 (52)

  1. LudiKha

    Feb 17, 2021 12:34

    Still getting this issue, in both the latest 2020.2 and 2021.1.

  2. chantey

    Feb 16, 2021 03:54

    still broken - windows 2020.2.1f1

  3. guneyozsan

    Feb 05, 2021 14:45

    Correction: Still having this on Unity 2020.2.1f1

  4. guneyozsan

    Feb 05, 2021 14:45

    Still having this on Unity 2020.2.0f1.

  5. Noirsoft

    Jan 04, 2021 18:41

    I just installed Unity 2020.2.0f1 and get this when creating a new project.

  6. Alex_Hsieh

    Dec 31, 2020 16:52

    It is not fixed. I'm using Unity 2019.4.16f1 on Windows, and every time Unity hub (2.4.2.0) tries to check for updates, the file "LastLayout.dwlt" will become corrupted, no exceptions.

  7. msyoung2012

    Nov 28, 2020 21:34

    This issue is not fixed in 2020.1.3f1. Clearly, it's been a problem for some time and keeps recurring. Please do not mark these things as resolved if they are not.

  8. Muckel

    Oct 29, 2020 06:21

    unity becomes more a mess with every version...
    i'm full dissapointed ... all those bug's on Mac OS X lately...
    soon you can only use it when online...
    a big mess is Unity3d now...
    work in parallel with UE engine... much better now ...
    will switch next year completely...

    in 2020.1.10f the bug still exist... :-(
    fxxk

  9. Thunderik

    Oct 20, 2020 11:02

    Still getting this
    NullReferenceException: Object reference not set to an instance of an object
    at UnityEditor.UIElements.UIElementsEditorUtility..cctor () [0x0003d] in <9ddd600ae5964fe0b21a870e08c53748>:0
    Rethrow as TypeInitializationException: The type initializer for 'UnityEditor.UIElements.UIElementsEditorUtility' threw an exception.
    at UnityEditor.SceneView.CreateCameraRectVisualElement () [0x00048] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SceneView.OnEnable () [0x00368] in <9ddd600ae5964fe0b21a870e08c53748>:0
    UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String)
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean, Boolean, Boolean)
    UnityEditor.WindowLayout:LoadProjectLayout(Boolean)
    UnityEditor.WindowLayout:LoadCurrentModeLayout(Boolean)
    UnityEditor.WindowLayout:RevertFactorySettings(Boolean)
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean, Boolean, Boolean)
    UnityEditor.WindowLayout:LoadProjectLayout(Boolean)
    UnityEditor.WindowLayout:LoadCurrentModeLayout(Boolean)
    UnityEditor.WindowLayout:RevertFactorySettings(Boolean)
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean, Boolean, Boolean)
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)
    UnityEditor.WindowLayout:LoadDefaultLayout()
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean, Boolean, Boolean)
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)
    UnityEditor.WindowLayout:LoadDefaultLayout()
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean, Boolean, Boolean)
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)
    UnityEditor.WindowLayout:LoadDefaultLayout()
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean, Boolean, Boolean)
    UnityEditor.WindowLayout:LoadProjectLayout(Boolean)
    UnityEditor.WindowLayout:LoadCurrentModeLayout(Boolean)
    UnityEditor.WindowLayout:LoadDefaultWindowPreferences()

    (Filename: <9ddd600ae5964fe0b21a870e08c53748> Line: 0)

    Failed to load window layout: System.TypeInitializationException: The type initializer for 'UnityEditor.UIElements.UIElementsEditorUtility' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object
    at UnityEditor.UIElements.UIElementsEditorUtility..cctor () [0x0003d] in <9ddd600ae5964fe0b21a870e08c53748>:0
    --- End of inner exception stack trace ---
    at UnityEditor.EditorToolbar.CreateRoot () [0x00045] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.EditorToolbar.get_rootVisualElement () [0x00017] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.Toolbar.PositionChanged (UnityEditor.GUIView view) [0x00001] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.GUIView.SetPosition (UnityEngine.Rect newPos) [0x00058] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.View.set_position (UnityEngine.Rect value) [0x00001] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.MainView.SetPosition (UnityEngine.Rect newPos) [0x0007f] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.View.set_position (UnityEngine.Rect value) [0x00001] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.ContainerWindow.set_rootView (UnityEditor.View value) [0x00050] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.WindowLayout.LoadWindowLayout (System.String path, System.Boolean newProjectLayoutWasCreated, System.Boolean setLastLoadedLayoutName, System.Boolean keepMainWindow) [0x002ec] in <9ddd600ae5964fe0b21a870e08c53748>:0
    UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:LogError(Object)
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean, Boolean, Boolean)
    UnityEditor.WindowLayout:LoadProjectLayout(Boolean)
    UnityEditor.WindowLayout:LoadCurrentModeLayout(Boolean)
    UnityEditor.WindowLayout:RevertFactorySettings(Boolean)
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean, Boolean, Boolean)
    UnityEditor.WindowLayout:LoadProjectLayout(Boolean)
    UnityEditor.WindowLayout:LoadCurrentModeLayout(Boolean)
    UnityEditor.WindowLayout:RevertFactorySettings(Boolean)
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean, Boolean, Boolean)
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)
    UnityEditor.WindowLayout:LoadDefaultLayout()
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean, Boolean, Boolean)
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)
    UnityEditor.WindowLayout:LoadDefaultLayout()
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean, Boolean, Boolean)
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)
    UnityEditor.WindowLayout:LoadDefaultLayout()
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean, Boolean, Boolean)
    UnityEditor.WindowLayout:LoadProjectLayout(Boolean)
    UnityEditor.WindowLayout:LoadCurrentModeLayout(Boolean)
    UnityEditor.WindowLayout:LoadDefaultWindowPreferences()

    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

    [LAYOUT] About to save layout C:\Projects\wkspaces\Headhunter_Unity\Library/CurrentLayout-default.dwlt
    [LAYOUT] About to save layout C:/Users/Petter/AppData/Roaming/Unity/Editor-5.x/Preferences\Layouts\default\LastLayout.dwlt

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.