Search Issue Tracker
Fix In Review for 2021.2.X
Votes
1
Found in
2020.2.0b11
2021.1
2021.1.0a10
Issue ID
1300089
Regression
Yes
[UI Builder] NullReferenceException error is thrown on clicking on Align Items control of Stylesheets Selector
NullReferenceException error is thrown on clicking on:
-Align Items control.
-Justify Contents control.
-Flex Direction control.
Steps to repro:
1. Create a new Project.
2. Window > UI Toolkit > UI Builder.
3. StyleSheets > Click on "+" > Create New USS > "Test".
4. Select "Test" > Inspector > Create New USS Selector > MyTest.
5. MyTest > Inspector > Align > Align Items > Click on any controls.
Actual Result:
NullReferenceException error in the console.
Expected Result:
No error in the console.
Reproducible in:
2021.1.0a10, 2020.2.0f1, 2020.2.0b11.
Working fine in:
2020.1.1f1 with Package version 1.0.0-preview.9.
Note:
Unable to test on 2020.2.b10 to 2020.2.0a1 due to errors on installing UI builder package.
Environment:
Occurring on Windows 10 & Mac 10.15.
Stack trace:
NullReferenceException: Object reference not set to an instance of an object
Unity.UI.Builder.BuilderCanvasStyleControls.AlignItemsUpdateToggleIcon () (at <185bda1d3c3049d3b8a4852e0de3edf6>:0)
Unity.UI.Builder.BuilderCanvasStyleControls.UpdateButtonIcons (System.Collections.Generic.List`1[T] styles) (at <185bda1d3c3049d3b8a4852e0de3edf6>:0)
Unity.UI.Builder.BuilderViewport.StylingChanged (System.Collections.Generic.List`1[T] styles, Unity.UI.Builder.BuilderStylingChangeType changeType) (at <185bda1d3c3049d3b8a4852e0de3edf6>:0)
Unity.UI.Builder.BuilderSelection.NotifyOfStylingChangePostStylingUpdate () (at <185bda1d3c3049d3b8a4852e0de3edf6>:0)
Unity.UI.Builder.BuilderSelection.AfterPanelUpdaterChange (UnityEngine.UIElements.GeometryChangedEvent evt) (at <185bda1d3c3049d3b8a4852e0de3edf6>:0)
UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.UIElements.EventCallbackRegistry.InvokeCallbacks (UnityEngine.UIElements.EventBase evt) (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.UIElements.DefaultDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.UIElements.UIRLayoutUpdater.Update () (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.UIElements.Panel.UpdateForRepaint () (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <b82edc26c1654793bdaefb66b6a2a38a>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <df88399a35f0499085499d10ca7e0e5d>:0)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [iOS] Unable to select streaming apps when using broadcasting on iOS device
- [iOS] Specular lightning is inconsistent when using iOS
- TransformAccessArray.Add behaves differently when the argument is null and the argument is an int
- [iOS] App crashes when trying to use WebCamTexture depth data on back triple camera
- [Mobile] Only second base Camera out of two base Cameras with priority 1 and -1 is rendered in the Player
Add comment