NullReferenceException: Object reference not set to an instance of an object.
UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException (System.Object obj) (at <454b8adca03e44db8a0e3ace7093e9b8>:0)
UnityEditor.SerializedObject.get_objectVersion () (at :0)
UnityEditor.UIElements.Bindings.SerializedObjectBindingBase.GetViewHashCode () (at <62cff2935c2446f5b89d419f3e03f073>:0)
UnityEngine.UIElements.VisualTreeDataBindingsUpdater.GetDataSourceVersion (System.Object source) (at <342504bd0e804d8681580f16844e29e7>:0)
UnityEngine.UIElements.VisualTreeDataBindingsUpdater.Update () (at <342504bd0e804d8681580f16844e29e7>:0)
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <342504bd0e804d8681580f16844e29e7>:0)
UnityEngine.UIElements.Panel.UpdateDataBinding () (at <342504bd0e804d8681580f16844e29e7>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.UpdateSchedulers () (at <342504bd0e804d8681580f16844e29e7>:0)
UnityEngine.UIElements.UIEventRegistration.UpdateSchedulers () (at <342504bd0e804d8681580f16844e29e7>:0)
UnityEditor.RetainedMode.UpdateSchedulers () (at <62cff2935c2446f5b89d419f3e03f073>:0)
The game is working fine, it is text based but includes various buttons. But, as I clicked on play, the errors started to gather rapidly and in a short amount of time, I wa sleft with:
Can you please provide a ticket number or additional context for this? Would love to know if it’s relevant to my case and if I can track its resolution.
Here’s my callstack. I thought it was the same as above at first glance, but it does differ.
NullReferenceException: Object reference not set to an instance of an object.
at UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException (System.Object obj) [0x00018] in C:\build\output\unity\unity\Runtime\Export\Scripting\BindingsHelpers.cs:62
at UnityEngine.Component.get_gameObject () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Component.TryGetComponent[T] (T& component) [0x00002] in C:\build\output\unity\unity\Runtime\Export\Scripting\Component.bindings.cs:58
at UnityEngine.Rendering.HighDefinition.HDAdditionalLightData.get_legacyLight () [0x00018] in .\Library\PackageCache\com.unity.render-pipelines.high-definition@16.0.5\Runtime\Lighting\Light\HDAdditionalLightData.cs:2182
at UnityEngine.Rendering.HighDefinition.HDAdditionalLightData.TickLateUpdate () [0x0005b] in .\Library\PackageCache\com.unity.render-pipelines.high-definition@16.0.5\Runtime\Lighting\Light\HDAdditionalLightData.cs:2666
at UnityEngine.Rendering.HighDefinition.LightLateUpdate.Tick () [0x00001] in .\Library\PackageCache\com.unity.render-pipelines.high-definition@16.0.5\Runtime\Lighting\Light\HDAdditionalLightData.cs:3883
Yes, that’s not a problem with UI Toolkit, looks more like a rendering/lighting problem in the scene. You can try the Graphics forums for that one : https://forum.unity.com/categories/graphics.75/
I’m having what I think is a similar problem in 6000.0.32. It happens every so often when I Run. Quitting Unity and restarting fixes the problem, usually. Sometimes I have to restart twice. Sometimes it happens after just 2-3 runs, sometimes not for quite a while. Not a serious problem, mostly just annoying because of the wasted time. It is pretty annoying to have to restart Unity so frequently.
NullReferenceException: Object reference not set to an instance of an object.
UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException (System.Object obj) (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/BindingsHelpers.cs:62)
UnityEditor.SerializedObject.get_isEditingMultipleObjects () (at <62fab501750b4de3afc961a1c4817728>:0)
UnityEditor.UIElements.Bindings.SerializedObjectList.get_Count () (at /Users/bokken/build/output/unity/unity/Modules/UIElementsEditor/Bindings/BaseListViewSerializedObjectBinding.cs:96)
UnityEngine.UIElements.VerticalVirtualizationController`1[T].get_itemsCount () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Collections/Virtualization/VerticalVirtualizationController.cs:27)
UnityEngine.UIElements.DynamicHeightVirtualizationController`1[T].IsIndexOutOfBounds (System.Int32 i) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Collections/Virtualization/DynamicHeightVirtualizationController.cs:1151)
UnityEngine.UIElements.DynamicHeightVirtualizationController`1[T].CleanItemHeightCache () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Collections/Virtualization/DynamicHeightVirtualizationController.cs:983)
UnityEngine.UIElements.DynamicHeightVirtualizationController`1[T].Refresh (System.Boolean rebuild) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Collections/Virtualization/DynamicHeightVirtualizationController.cs:168)
UnityEngine.UIElements.BaseVerticalCollectionView.RefreshItems () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Controls/BaseVerticalCollectionView.cs:1286)
UnityEngine.UIElements.BaseVerticalCollectionView.UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Controls/BaseVerticalCollectionView.cs:2096)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:219)
Have you updated your editor version since then? 6000.0.32 is about 3 months out of date by now. Potentially this has been fixed since then, but work checking the release notes.