NullReferenceExceptions from GUIHelper.cs:405

Issue #556 resolved
Juhana Lehtiniemi created an issue

I have a really complicated nested structure in the inspector and sometimes when I unfold it (using FoldoutGroup), I get multiples of these two errors in the console (at the end of message).

Running Odin Inspector 2.1.0 on Unity 2019.3.0a7. Also using Odin Serializer to serialize the very deep nested structure I have.

This also happened with the previous 2.0.x-version of Odin so it doesn’t seem to be from the beta version.

I can paste you some classes from the nested structure if something helps, but it’s so many files I’d rather hear what is helpful to you first.

Any ideas what might cause this?

ERROR 1:

NullReferenceException: Object reference not set to an instance of an object
(wrapper dynamic-method) System.Object.UnityEditor.GUIView_getter<current.GetInstanceID()>()
Sirenix.Utilities.Editor.GUIHelper.get_CurrentWindowInstanceID () (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.Utilities.Editor/GUI/GUIHelper.cs:438)
Sirenix.Utilities.Editor.EditorTimeHelper.get_Time () (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.Utilities.Editor/Misc/EditorTime.cs:32)
Sirenix.Utilities.Editor.SirenixEditorGUI.BeginFadeGroup (System.Object key, System.Boolean isVisible, System.Single duration) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.Utilities.Editor/GUI/SirenixEditorGUI.cs:1769)
Sirenix.Utilities.Editor.SirenixEditorGUI.BeginFadeGroup (System.Object key, System.Boolean isVisible) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.Utilities.Editor/GUI/SirenixEditorGUI.cs:1725)
Sirenix.OdinInspector.Editor.Drawers.InlineEditorAttributeDrawer1[T].DrawEditor () (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Attribute Drawers/InlineEditorAttributeDrawer.cs:127) Sirenix.OdinInspector.Editor.Drawers.InlineEditorAttributeDrawer1[T].DrawPropertyLayout (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Attribute Drawers/InlineEditorAttributeDrawer.cs:83)
Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:306)
Sirenix.OdinInspector.Editor.Drawers.InfoBoxAttributeDrawer.DrawPropertyLayout (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Attribute Drawers/InfoBoxAttributeDrawer.cs:103)
Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:306)
Sirenix.OdinInspector.Editor.Drawers.ReferenceValueConflictDrawer1[T].DrawPropertyLayout (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/ReferenceValueConflictDrawer.cs:55) Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:306) Sirenix.OdinInspector.Editor.Drawers.ReferencePathConflictDrawer1[T].DrawPropertyLayout (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/ReferencePathConflictDrawer.cs:45)
Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:306)
Sirenix.OdinInspector.Editor.Drawers.LabelTextAttributeDrawer.DrawPropertyLayout (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Attribute Drawers/LabelTextAttributeDrawer.cs:60)
Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:306)
Sirenix.OdinInspector.Editor.Drawers.PropertyContextMenuDrawer`1[T].DrawPropertyLayout (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/PropertyContextMenuDrawer.cs:313)
Sirenix.OdinInspector.Editor.OdinDrawer.DrawProperty (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:176)
Sirenix.OdinInspector.Editor.InspectorProperty.Draw (UnityEngine.GUIContent defaultLabel) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/InspectorProperty.cs:540)
Rethrow as OdinPropertyException: This error occurred while being drawn by Odin.
Odin Property Path: gameToEdit
Odin Drawer Chain:

PropertyContextMenuDrawer<Game>
LabelTextAttributeDrawer
ReferencePathConflictDrawer<Game>
ReferenceValueConflictDrawer<Game>
InfoBoxAttributeDrawer
InlineEditorAttributeDrawer<Game>
UnityObjectDrawer<Game>
CompositeDrawer.
UnityEngine.Debug:LogException(Exception)
Sirenix.OdinInspector.Editor.InspectorProperty:Draw(GUIContent) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/InspectorProperty.cs:590)
Sirenix.OdinInspector.Editor.InspectorUtilities:DrawPropertiesInTree(PropertyTree) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Misc/InspectorUtilities.cs:404)
Sirenix.OdinInspector.Editor.PropertyTree:Draw(Boolean) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/PropertyTree.cs:300)
Sirenix.OdinInspector.Editor.OdinEditor:DrawTree() (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:93)
Sirenix.OdinInspector.Editor.OdinEditor:DrawOdinInspector() (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:233)
Sirenix.OdinInspector.Editor.OdinEditor:OnInspectorGUI() (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:85)
UnityEditor.UIElements.Tooltip:SetTooltip(Single, Single)

ERROR 2:
NullReferenceException: Object reference not set to an instance of an object
Sirenix.Utilities.Editor.GUIHelper.get_CurrentWindow () (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.Utilities.Editor/GUI/GUIHelper.cs:405)
Sirenix.Utilities.Editor.DragAndDropManager.BeginDropZone (System.Object key, System.Type type, System.Boolean canAcceptMove) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.Utilities.Editor/GUI/DragAndDrop/DragAndDropManager.cs:89)
Sirenix.OdinInspector.Editor.Drawers.CollectionDrawer1[T].BeginDropZone () (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Value Drawers/CollectionDrawer.cs:618) Sirenix.OdinInspector.Editor.Drawers.CollectionDrawer1[T].DrawPropertyLayout (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Value Drawers/CollectionDrawer.cs:515)
Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:306)
Sirenix.OdinInspector.Editor.Drawers.NullableReferenceDrawer1[T].DrawPropertyLayout (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/NullableReferenceDrawer.cs:95) Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:306) Sirenix.OdinInspector.Editor.Drawers.ReferenceValueConflictDrawer1[T].DrawPropertyLayout (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/ReferenceValueConflictDrawer.cs:55)
Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:306)
Sirenix.OdinInspector.Editor.Drawers.ReferencePathConflictDrawer1[T].DrawPropertyLayout (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/ReferencePathConflictDrawer.cs:45) Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:306) Sirenix.OdinInspector.Editor.Drawers.PropertySpaceAttributeDrawer.DrawPropertyLayout (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Attribute Drawers/PropertySpaceAttributeDrawer.cs:48) Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:306) Sirenix.OdinInspector.Editor.Drawers.FixUnityNullDrawer1[T].DrawPropertyLayout (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/FixUnityNullDrawer.cs:78)
Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:306)
Sirenix.OdinInspector.Editor.Drawers.ReferenceDrawer1[T].DrawPropertyLayout (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/ReferenceDrawer.cs:106) Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:306) Sirenix.OdinInspector.Editor.Drawers.PropertyContextMenuDrawer1[T].DrawPropertyLayout (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/PropertyContextMenuDrawer.cs:313)
Sirenix.OdinInspector.Editor.OdinDrawer.DrawProperty (UnityEngine.GUIContent label) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:176)
Sirenix.OdinInspector.Editor.InspectorProperty.Draw (UnityEngine.GUIContent defaultLabel) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/InspectorProperty.cs:540)
Rethrow as OdinPropertyException: This error occurred while being drawn by Odin.
Odin Property Path: localGameLibrary
Odin Drawer Chain:

PropertyContextMenuDrawer<List<Object>>
ReferenceDrawer<List<Object>>
FixUnityNullDrawer<List<Object>>
PropertySpaceAttributeDrawer
ReferencePathConflictDrawer<List<Object>>
ReferenceValueConflictDrawer<List<Object>>
NullableReferenceDrawer<List<Object>>
CollectionDrawer<List<Object>>
CompositeDrawer.
UnityEngine.Debug:LogException(Exception)
Sirenix.OdinInspector.Editor.InspectorProperty:Draw(GUIContent) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/InspectorProperty.cs:590)
Sirenix.OdinInspector.Editor.InspectorUtilities:DrawPropertiesInTree(PropertyTree) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Misc/InspectorUtilities.cs:404)
Sirenix.OdinInspector.Editor.PropertyTree:Draw(Boolean) (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/PropertyTree.cs:300)
Sirenix.OdinInspector.Editor.OdinEditor:DrawTree() (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:93)
Sirenix.OdinInspector.Editor.OdinEditor:DrawOdinInspector() (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:233)
Sirenix.OdinInspector.Editor.OdinEditor:OnInspectorGUI() (at C:/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:85)
UnityEditor.UIElements.Tooltip:SetTooltip(Single, Single)

Comments (1)

  1. Log in to comment