Search Issue Tracker

Fixed in 2020.2

Fixed in 2020.1

Votes

50

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 2020.2):

    Tested fix in 2021.1.0a1 (checked on MacOS).

    Given an invalid or corrupted LastLayout.dwlt file in ~/Library/Preferences/Unity/Editor-5.x/Layouts/default/ Unity now opens without prompting the user for action in an infinite loop.
    Now, an exception will be logged in the console indicating that Unity failed to load the window layout, and Unity's default layout will be loaded instead.

    Note: The directory to find LastLayout.dwlt will differ according to operating system.

  2. Response avatar

    Resolution Note (fix version 2020.2):

    Tested fixed in 2020.2.0b5 (checked on MacOS).

    Given an invalid or corrupted LastLayout.dwlt file in ~/Library/Preferences/Unity/Editor-5.x/Layouts/default/ Unity now opens without prompting the user for action in an infinite loop.
    Now, an exception will be logged in the console indicating that Unity failed to load the window layout, and Unity's default layout will be loaded instead.

    Note: The directory to find LastLayout.dwlt will differ according to operating system.

  3. Response avatar

    Resolution Note (fix version 2020.1):

    Tested fixed in 2020.1.8f1 (checked on MacOS).

    Given an invalid or corrupted LastLayout.dwlt file in ~/Library/Preferences/Unity/Editor-5.x/Layouts/default/ Unity now opens without prompting the user for action in an infinite loop.
    Now, an exception will be logged in the console indicating that Unity failed to load the window layout, and Unity's default layout will be loaded instead.

    Note: The directory to find LastLayout.dwlt will differ according to operating system.

Comments (32)

  1. 0282a84ea3eb2d308f9fc6ce648db289?d=mm

    erkneren

    Oct 15, 2020 07:15

    Seems .8 on Windows helps a bit but it's still there for some.

    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.UIElements.UIElementsEntryPoint.CreateRoot () [0x00045] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.UIElements.UIElementsEntryPoint.GetRootVisualElement (UnityEditor.EditorWindow window) [0x00011] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.EditorWindow.get_rootVisualElement () [0x00000] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.PropertyEditor.LoadVisualTreeFromUxml () [0x00011] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.InspectorWindow.OnEnable () [0x0000f] in <9ddd600ae5964fe0b21a870e08c53748>:0
    UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String)
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean, Boolean, Boolean)
    UnityEditor.WindowLayout:LoadProjectLayout(Boolean)
    UnityEditor.WindowLayout:LoadCurrentModeLayout(Boolean)
    UnityEditor.WindowLayout:LoadDefaultWindowPreferences()

    (Filename: <9ddd600ae5964fe0b21a870e08c53748> Line: 0)

    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.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.HostView.SetPosition (UnityEngine.Rect newPos) [0x00001] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.View.set_position (UnityEngine.Rect value) [0x00001] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.PlaceView (System.Int32 i, System.Single pos, System.Single size) [0x000a1] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.SetupRectsFromSplitter () [0x000d8] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.Reflow () [0x00072] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.SetPosition (UnityEngine.Rect newPos) [0x00009] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.View.set_position (UnityEngine.Rect value) [0x00001] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.PlaceView (System.Int32 i, System.Single pos, System.Single size) [0x000a1] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.SetupRectsFromSplitter () [0x000d8] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.Reflow () [0x00072] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.SetPosition (UnityEngine.Rect newPos) [0x00009] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.View.set_position (UnityEngine.Rect value) [0x00001] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.PlaceView (System.Int32 i, System.Single pos, System.Single size) [0x000a1] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.SetupRectsFromSplitter () [0x000d8] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.Reflow () [0x00072] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.SetPosition (UnityEngine.Rect newPos) [0x00009] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.View.set_position (UnityEngine.Rect value) [0x00001] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.MainView.SetPosition (UnityEngine.Rect newPos) [0x000c8] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.View.set_position (UnityEngine.Rect value) [0x00001] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.ContainerWindow.OnResize () [0x00044] in <9ddd600ae5964fe0b21a870e08c53748>:0
    UnityEditor.ContainerWindow:Internal_Show_Injected(Rect&, Int32, Vector2&, Vector2&)
    UnityEditor.ContainerWindow:Internal_Show(Rect, Int32, Vector2, Vector2)
    UnityEditor.ContainerWindow:Show(ShowMode, Boolean, Boolean, Boolean)
    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.HostView.SetPosition (UnityEngine.Rect newPos) [0x00001] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.View.set_position (UnityEngine.Rect value) [0x00001] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.PlaceView (System.Int32 i, System.Single pos, System.Single size) [0x000a1] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.SetupRectsFromSplitter () [0x000d8] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.Reflow () [0x00072] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.SetPosition (UnityEngine.Rect newPos) [0x00009] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.View.set_position (UnityEngine.Rect value) [0x00001] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.PlaceView (System.Int32 i, System.Single pos, System.Single size) [0x000a1] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.SetupRectsFromSplitter () [0x000d8] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.Reflow () [0x00072] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.SetPosition (UnityEngine.Rect newPos) [0x00009] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.View.set_position (UnityEngine.Rect value) [0x00001] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.PlaceView (System.Int32 i, System.Single pos, System.Single size) [0x000a1] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.SetupRectsFromSplitter () [0x000d8] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.Reflow () [0x00072] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.SplitView.SetPosition (UnityEngine.Rect newPos) [0x00009] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.View.set_position (UnityEngine.Rect value) [0x00001] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.MainView.SetPosition (UnityEngine.Rect newPos) [0x000c8] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.View.set_position (UnityEngine.Rect value) [0x00001] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.ContainerWindow.Show (UnityEditor.ShowMode showMode, System.Boolean loadPosition, System.Boolean displayImmediately, System.Boolean setFocus) [0x0011c] in <9ddd600ae5964fe0b21a870e08c53748>:0
    at UnityEditor.WindowLayout.LoadWindowLayout (System.String path, System.Boolean newProjectLayoutWasCreated, System.Boolean setLastLoadedLayoutName, System.Boolean keepMainWindow) [0x003fe] 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:LoadDefaultWindowPreferences()

  2. Eead98f4613ad7f415024cf482044881?d=mm

    RedHermit

    Oct 15, 2020 04:58

    2020.1.9 (released today) resolved this issue for me as well

  3. 589054f09fc23f99d8c298331ba36058?d=mm

    SeekerBear

    Oct 14, 2020 21:42

    Appears to be fixed in 2020.1.9 (released today)

  4. B065970bb393568c8a64ad40dd453bba?d=mm

    Quartermaster47

    Oct 07, 2020 12:25

    I fixed this issue by copy and pasting the CurrentLayout-default.dwlt file from my previous project onto the CurrentLayout-default.dwlt file from a new project. Hope this helps!

    I'm on 2020.1.6f1

  5. 222bf45b106d27aaf1e5dc9eabc236f9?d=mm

    DragonParrot

    Oct 07, 2020 10:36

    I'm also having this issue on Unity 2020.1.6f1. The workaround of manually deleting the layout files works for me, though I admit that it does feel a bit frustrating.

  6. B0b0a05dbf73cbc0c53ff7b58415a2fa?d=mm

    SIPAA

    Oct 06, 2020 12:43

    Still having this problem on Unity Hub 2.4.0 and Unity 2020.1.6f1. Cannot create a new project

  7. 2699114eea3f40fea3a245847aa17909?d=mm

    munozpro

    Oct 05, 2020 09:42

    NOT fixed, As of 10/5/2020

    The copy and paste workaround is only a temporary fix! I would only able to work on my project for an hour until I get errors in the console, and the inspector stays blank.

  8. D91c4dd43c82afd058968a8aa7a8a24d?d=mm

    ZoeDreams

    Oct 04, 2020 16:46

    The easiest way to fix this is to just remove the Last and Current layouts which get locked and wrong permission so they do not get updated when creating a new project with the default layout. Could i suggest just to manually copying over the default template file, instead of trying to update when you trigger a first load import. Thank you.

    just remove these two files, and unity will autogenerate the proper ones when you open the project again.

    <home_dir>/Library/Preferences/Unity/Editor-5.x/Layouts/default/LastLayout.dwlt
    <project_dir>/Library/CurrentLayout-default.dwlt

  9. D91c4dd43c82afd058968a8aa7a8a24d?d=mm

    ZoeDreams

    Oct 04, 2020 16:39

    This is still broken on MacOS 10.15.7 (19H2). using the latest version of UNITY. This is like super easy to fix, wtf?

  10. 0e75e16c118536a182f6d8e3f55c5ffb?d=mm

    GrandMasterTux

    Oct 03, 2020 18:49

    Thanks @UNITY_P1HWJALSC5LYGA this resolved my issue. This issue exists on Windows 2020.1.6f1. Uninstalled Unity and Installed the latest 2020.1.7f1 and issue still existed. Issue occurred on both versions listed when a new project was created using Universal Render Pipeline.

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.