Search Issue Tracker
In Progress
Votes
0
Found in [Package]
2.5.1
Issue ID
XRCB-16
Regression
Yes
"InvalidOperationException: Cannot modify VisualElement hierarchy during layout calculation" and "NullReferenceException: Object reference not set to an instance of an object" errors are thrown after creating a Mixed Reality project
*Steps to reproduce:*
1. Create a new project using Mixed Reality template
2. Observe the Console
*Actual results:* "InvalidOperationException: Cannot modify VisualElement hierarchy during layout calculation" and "NullReferenceException: Object reference not set to an instance of an object" errors are thrown
*Expected results:* No errors or warnings are thrown
*Reproducible with versions:* 6000.2.0a4
*Not reproducible with versions:* 6000.0.39f1, 6000.1.0b7, 6000.2.0a3
*Can't test with versions:* 2021.3.49f1 (No Mixed Reality template present)
*Tested on (OS):* macOS Sequoia 15.3 (M1), macOS Sequoia 15.2 (Intel)
*Notes:*
* Issue is reproducible on macOS Sequoia 15.2 (Intel) only after "Fix All" button is pressed on Project Validation window
* Full errors:
{code:java}
InvalidOperationException: Cannot modify VisualElement hierarchy during layout calculation
UnityEngine.UIElements.VisualElement+Hierarchy.Clear () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/VisualElementHierarchy.cs:673)
UnityEngine.UIElements.VisualElement.Clear () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/VisualElementHierarchy.cs:256)
UnityEditor.SettingsWindow.ProviderChanged (UnityEditor.SettingsProvider lastSelectedProvider, UnityEditor.SettingsProvider newlySelectedProvider) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Settings/SettingsWindow.cs:276)
UnityEditor.SettingsTreeView.SelectionChanged (System.Collections.Generic.IList`1[T] selectedIds) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Settings/SettingsTreeView.cs:66)
UnityEditor.SettingsTreeView.FocusSelection (System.Int32 selectedId) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Settings/SettingsTreeView.cs:46)
UnityEditor.SettingsWindow.SelectProviderByName (System.String name, System.Boolean ignoreLastSelected) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Settings/SettingsWindow.cs:111)
UnityEditor.SettingsWindow.RestoreSelection () (at /Users/bokken/build/output/unity/unity/Editor/Mono/Settings/SettingsWindow.cs:242)
UnityEditor.SettingsWindow.InitProviders () (at /Users/bokken/build/output/unity/unity/Editor/Mono/Settings/SettingsWindow.cs:168)
UnityEditor.SettingsWindow.DrawTreeView () (at /Users/bokken/build/output/unity/unity/Editor/Mono/Settings/SettingsWindow.cs:500)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/IMGUIContainer.cs:403)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:219) {code}
{code:java}
NullReferenceException: Object reference not set to an instance of an object Unity.XR.CoreUtils.Editor.ProjectValidationSettingsProvider.OnInspectorUpdate () (at ./Library/PackageCache/com.unity.xr.core-utils@c0df0dd5bced/Editor/ProjectValidation/ProjectValidationSettingsProvider.cs:45) UnityEditor.SettingsWindow.OnInspectorUpdate () (at /Users/bokken/build/output/unity/unity/Editor/Mono/Settings/SettingsWindow.cs:185) UnityEditor.HostView.OnInspectorUpdate () (at /Users/bokken/build/output/unity/unity/Editor/Mono/HostView.cs:452)
{code}
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Unable to switch to either Facebook Instant Games/Meta Quest in the Build Profile
- Error "IndexOutOfRangeException: Index was outside the bounds of the array" logged when selecting an Element in UI Builder with a specific setup
- "native code called abort()" is thrown in WebGL player when loading first scene
- Crash on core::base_hash_set when importing a specific package
- SettingsService.NotifySettingsProviderChanged() Doesn't Call OnDeactivate for Existing SettingsProviders when new ServiceProvider is created
Add comment