unity-xr-plugin icon indicating copy to clipboard operation
unity-xr-plugin copied to clipboard

"Failed to load window layout" Error

Open PhiSel opened this issue 5 years ago • 14 comments

The following error occurs when the plugin is installed, the Project Settings tab is open and unity is restarted:

image

How to reproduce the error:

  1. Create a new Unity Project (e.g. 2019.4.8)
  2. Install the OpenVR XR Plugin (https://github.com/ValveSoftware/unity-xr-plugin/releases/tag/installer)
  3. Open the Project Settings Window
  4. Close Unity and reopen the project
The editor log shows this:

[MODES] Loading mode Default (0) for mode-current-id-OpenVR_XR_bug
<RI> Initialized touch support.

<RI> Initialized touch support.

<RI> Initialized touch support.

<RI> Initialized touch support.

<RI> Initialized touch support.

<RI> Initialized touch support.

<RI> Initialized touch support.

<RI> Initialized touch support.

Start importing Assets/XR/Settings/Open VR Settings.asset using Guid(d4513fcaf1a045346ada3b36cf02eacf) Importer(-1,00000000000000000000000000000000)
Done importing asset: 'Assets/XR/Settings/Open VR Settings.asset' (target hash: '178abffbc1da6497d0ffb77f76134c76') in 0.003706 seconds
Refreshing native plugins compatible for Editor in 0.31 ms, found 3 plugins.
Preloading 0 native plugins for Editor in 0.00 ms.
RefreshInfo: StopAssetImportingV2(NoUpdateAssetOptions)
RefreshProfiler: Total: 0.000ms
	InvokeBeforeRefreshCallbacks: 59.754ms
	ApplyChangesToAssetFolders: 0.346ms
	WriteModifiedImportersToTextMetaFiles: 0.061ms
	CleanLegacyArtifacts: 0.000ms
	Scan: 0.000ms
	OnSourceAssetsModified: 42.703ms
	UnregisterDeletedAssets: 0.000ms
	InitializeImportedAssetsSnapshot: 0.000ms
	GetAllGuidsForCategorization: 2.199ms
	CategorizeAssets: 0.208ms
	ImportAndPostprocessOutOfDateAssets: 0.649ms (11.085ms without children)
		ImportManagerImport: 0.843ms (6.178ms without children)
			ImportInProcess: 0.825ms
			ImportOutOfProcess: 5.338ms
			UpdateCategorizedAssets: 0.000ms
			RemoteAssetCacheGetArtifact: 0.016ms (0.000ms without children)
				RemoteAssetCacheResolve: 0.000ms
				RemoteAssetCacheDownloadFile: 0.000ms
		CompileScripts: 0.000ms
		PostProcessAllAssets: 0.000ms
		ReloadImportedAssets: 1.852ms
		VerifyAssetsAreUpToDateAndCorrect: 0.001ms
		EnsureUptoDateAssetsAreRegisteredWithGuidPM: 0.000ms
		InitializingProgressBar: 0.100ms
		PostProcessAllAssetNotificationsAddChangedAssets: 0.001ms
		OnDemandSchedulerStart: 0.087ms
		RestoreLoadedAssetsState: 0.109ms
	InvokeProjectHasChanged: 0.599ms
	UpdateImportedAssetsSnapshot: 0.000ms
	ReloadSourceAssets: 1.314ms
	UnloadImportedAssets: 0.535ms
	Hotreload: 0.044ms
	FixTempGuids: 0.429ms
	VerifyGuidPMRegistrations: 0.002ms
	GatherAllCurrentPrimaryArtifactRevisions: 0.000ms
	UnloadStreamsBegin: 0.102ms
	LoadedImportedAssetsSnapshotReleaseGCHandles: 0.069ms
	GetLoadedSourceAssetsSnapshot: 0.359ms
	PersistCurrentRevisions: 1.267ms
	UnloadStreamsEnd: 0.000ms
	GenerateScriptTypeHashes: 0.064ms
Adding genesis user token Adding genesis user token Adding genesis user token Adding genesis user token Adding genesis user token Adding genesis user token Adding genesis user token Adding genesis user token Failed to load window layout: System.ArgumentException: Window layout at 'Library/CurrentLayout-default.dwlt' could not be loaded.
  at UnityEditor.WindowLayout.LoadWindowLayout (System.String path, System.Boolean newProjectLayoutWasCreated, System.Boolean setLastLoadedLayoutName, System.Boolean keepMainWindow) [0x000fa] in <d7545a46516941d4b2f2dec578cd41ee>: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:LoadDefaultWindowPreferencesEx(Boolean)
UnityEditor.WindowLayout:LoadDefaultWindowPreferences()
 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

PhiSel avatar Aug 20 '20 08:08 PhiSel

This error is confirmed by colleagues in Unity version: 2019.4.2, 2019.4.6 and 2019.4.8

PhiSel avatar Aug 20 '20 10:08 PhiSel

Confirming issue on my end as well (Unity 2019.4.8). This seems to be caused by the "Prompt To Upgrade Package" under "Project Settings/XR Plug-in Management/OpenVR/"

image

Edit: The error is persistent again despite having the "Prompt To Upgrade Package" checkbox unchecked.

cameronfeng avatar Sep 03 '20 17:09 cameronfeng

The following error occurs when the plugin is installed, the Project Settings tab is open and unity is restarted:

image

How to reproduce the error:

  1. Create a new Unity Project (e.g. 2019.4.8)
  2. Install the OpenVR XR Plugin (https://github.com/ValveSoftware/unity-xr-plugin/releases/tag/installer)
  3. Open the Project Settings Window
  4. Close Unity and reopen the project

The editor log shows this:

Here's The Solution: https://www.youtube.com/watch?v=bUscnPvXsew&t=3s

manuel201728 avatar Sep 19 '20 13:09 manuel201728

https://www.youtube.com/watch?v=bUscnPvXsew&t=3s

manuel201728 avatar Sep 19 '20 13:09 manuel201728

The following error occurs when the plugin is installed, the Project Settings tab is open and unity is restarted: /snip

Here's The Solution: https://www.youtube.com/watch?v=bUscnPvXsew&t=3s

Can confirm this worked for me. Video is in Spanish but easy enough to follow along.

sickpupp avatar Sep 19 '20 20:09 sickpupp

The following error occurs when the plugin is installed, the Project Settings tab is open and unity is restarted: /snip

Here's The Solution: https://www.youtube.com/watch?v=bUscnPvXsew&t=3s

Can confirm this worked for me. Video is in Spanish but easy enough to follow along.

From what I can tell this videos just shows how to overwrite your current layout in the Library folder with the Default layout manually, which to me seems to be the same action as pressing the "Load Default Layout" button on the error message. Not really a solution.

Clavus avatar Sep 26 '20 21:09 Clavus

It is a solution because pressing the button to load default configuration does not work and I know why I say it because it was happening to me.

El sáb., 26 de septiembre de 2020 5:50 p. m., Clavus < [email protected]> escribió:

The following error occurs when the plugin is installed, the Project Settings tab is open and unity is restarted: /snip

Here's The Solution: https://www.youtube.com/watch?v=bUscnPvXsew&t=3s

Can confirm this worked for me. Video is in Spanish but easy enough to follow along.

From what I can tell this videos just shows how to overwrite your current layout in the Library folder with the Default layout manually, which to me seems to be the same action as pressing the "Load Default Layout" button on the error message. Not really a solution.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ValveSoftware/unity-xr-plugin/issues/35#issuecomment-699552165, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANF2V3YVVNNQYPN7EJTAWBDSHZO2FANCNFSM4QFZOH7A .

manuel201728 avatar Sep 26 '20 22:09 manuel201728

In my case the Load Default Layout option does work. Since the default layout does not open the Project Settings window it does not trigger the error. So your error could potentially have a different cause than the one in this report.

Clavus avatar Sep 26 '20 22:09 Clavus

apparently

El sáb., 26 de septiembre de 2020 6:13 p. m., Clavus < [email protected]> escribió:

In my case the Load Default Layout option does work. Since the default layout does not open the Project Settings window it does not trigger the error. So your error could potentially have a different cause than the one in this report.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ValveSoftware/unity-xr-plugin/issues/35#issuecomment-699554752, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANF2V34EXYJDQSB3QQCQZT3SHZRPFANCNFSM4QFZOH7A .

manuel201728 avatar Sep 26 '20 22:09 manuel201728

problem fixed here : https://youtu.be/Av9zt1gcpqc

ahmedaniss25 avatar Oct 10 '20 12:10 ahmedaniss25

problem fixed here : https://youtu.be/Av9zt1gcpqc

Again, not the same issue as the one causing this.

Clavus avatar Oct 10 '20 12:10 Clavus

Confirming this is still current in 2020.2.1f1

Kind of dodgy that this has been around for so long, I wasted a lot of time excluding solutions like those posted here. It is not evident from the Editor log files or the error itself that the OpenVR plugin is to blame so its very difficult toi work out what is going wrong.

NathanMc avatar Jan 06 '21 02:01 NathanMc

I seem to occasionally be getting this error without the openvr plugin in the project, so I suspect something in Unity's windowing system is to blame.

keithbradner avatar Jan 11 '21 20:01 keithbradner

The error in Unity can no doubt be caused by lots of different Editor-based code. In fact that is what is so maddening because there are a lot of proposed solutions that -don't- apply to this instance's very generic catch-all dialog. We don't really know whether the user code is misbehaving or if there is a flaw in the Unity Editor Engine.

That said, it is reliably replicated by:

1 - Creating a new empty project. 2 - Installing the OpenVR plugin. 3 - Saving the project with the Project Settings window open. 4 - Closing and reopening the project.

This means that the OpenVR code is breaking the current version of the Unity Editor, and it should be investigated and fixed by Valve.

NathanMc avatar Jan 11 '21 21:01 NathanMc