Reputation: 21
When I start Unity the console prints the same error message 6 times: It's a Null Reference Exeption but when I clear the console and start the game everything works and there aren't any problems. It also doesn't appear again while working on the project, only when I restart Unity. How can I fix that or is that normal? Exception stacktrace:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.UIElements.StyleSheets.StyleSelectorHelper.FastLookup (System.Collections.Generic.IDictionary`2[TKey,TValue] table, System.Collections.Generic.List`1[T] matchedSelectors, UnityEngine.UIElements.StyleMatchingContext context, System.String input, UnityEngine.UIElements.StyleSheets.SelectorMatchRecord& record) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.StyleSheets.StyleSelectorHelper.FindMatches (UnityEngine.UIElements.StyleMatchingContext context, System.Collections.Generic.List`1[T] matchedSelectors) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.VisualTreeStyleUpdaterTraversal.TraverseRecursive (UnityEngine.UIElements.VisualElement element, System.Int32 depth) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.StyleSheets.HierarchyTraversal.Traverse (UnityEngine.UIElements.VisualElement element) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.VisualTreeStyleUpdater.ApplyStyles () (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.VisualTreeStyleUpdater.Update () (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.Panel.UpdateForRepaint () (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <2500dd078a544a69b6c923861af6cd15>:0)
Upvotes: 1
Views: 1614
Reputation: 21
I ran into this same issue when I had external backup software running which locked files just after project creation while they were still uploading. Closing the backup software got rid of the errors for me.
Upvotes: 2