Error messages when inspecting scriptable object
Issue #894
new
1. What happened?
Two Error messages when inspecting a scriptable object through the Hierarchy View (using Alt-P in the Project View is fine).
Unity 2022.1.23f1
First Error:
InvalidOperationException: Stack empty.
System.Collections.Generic.Stack`1[T].ThrowForEmptyStack () (at <252f5a151e57406087568ebdeb88d5fe>:0)
System.Collections.Generic.Stack`1[T].Pop () (at <252f5a151e57406087568ebdeb88d5fe>:0)
Sirenix.OdinInspector.Editor.InspectorProperty.PopDraw () (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/InspectorProperty.cs:988)
Sirenix.OdinInspector.Editor.InspectorProperty.Draw (UnityEngine.GUIContent defaultLabel) (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/InspectorProperty.cs:951)
Sirenix.OdinInspector.Editor.InspectorProperty.Draw () (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/InspectorProperty.cs:737)
Sirenix.OdinInspector.Editor.Drawers.UnityObjectRootDrawer`1[T].DrawPropertyLayout (UnityEngine.GUIContent label) (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Value Drawers/UnityObjectRootDrawer.cs:60)
Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (UnityEngine.GUIContent label) (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:155)
Sirenix.OdinInspector.Editor.Validation.ValidationDrawer`1[T].DrawPropertyLayout (UnityEngine.GUIContent label) (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Validation/Core/ValidationDrawer.cs:222)
Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (UnityEngine.GUIContent label) (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:155)
Sirenix.OdinInspector.Editor.Drawers.FixBrokenUnityObjectWrapperDrawer`1[T].DrawPropertyLayout (UnityEngine.GUIContent label) (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Attribute Drawers/FixBrokenUnityObjectWrapperDrawer.cs:41)
Sirenix.OdinInspector.Editor.OdinDrawer.DrawProperty (UnityEngine.GUIContent label) (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:109)
Sirenix.OdinInspector.Editor.InspectorProperty.Draw (UnityEngine.GUIContent defaultLabel) (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/InspectorProperty.cs:849)
Rethrow as OdinPropertyException: This error occurred while being drawn by Odin.
Current IMGUI event: Used
Odin Property Path: $ROOT
Odin Drawer Chain:
> FixBrokenUnityObjectWrapperDrawer<AutoCanvasScaler>
> ValidationDrawer<AutoCanvasScaler>
> UnityObjectRootDrawer<AutoCanvasScaler>
> CompositeDrawer.
UnityEngine.Debug:LogException(Exception)
Sirenix.OdinInspector.Editor.InspectorProperty:Draw(GUIContent) (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/InspectorProperty.cs:926)
Sirenix.OdinInspector.Editor.PropertyTree:DrawProperties() (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/PropertyTree.cs:556)
Sirenix.OdinInspector.Editor.PropertyTree:Draw(Boolean) (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/PropertyTree.cs:448)
Sirenix.OdinInspector.Editor.OdinEditor:DrawTree() (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:97)
Sirenix.OdinInspector.Editor.OdinEditor:DrawOdinInspector() (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:254)
Sirenix.OdinInspector.Editor.OdinEditor:OnInspectorGUI() (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:79)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Second Error
InvalidOperationException: Stack empty.
System.Collections.Generic.Stack`1[T].ThrowForEmptyStack () (at <252f5a151e57406087568ebdeb88d5fe>:0)
System.Collections.Generic.Stack`1[T].Pop () (at <252f5a151e57406087568ebdeb88d5fe>:0)
Sirenix.OdinInspector.Editor.InspectorProperty.PopDraw () (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/InspectorProperty.cs:988)
Sirenix.OdinInspector.Editor.InspectorProperty.Draw (UnityEngine.GUIContent defaultLabel) (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/InspectorProperty.cs:951)
Sirenix.OdinInspector.Editor.PropertyTree.DrawProperties () (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/PropertyTree.cs:556)
Sirenix.OdinInspector.Editor.PropertyTree.Draw (System.Boolean applyUndo) (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/PropertyTree.cs:448)
Sirenix.OdinInspector.Editor.OdinEditor.DrawTree () (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:97)
Sirenix.OdinInspector.Editor.OdinEditor.DrawOdinInspector () (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:254)
Sirenix.OdinInspector.Editor.OdinEditor.OnInspectorGUI () (at W:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:79)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass62_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <ae84eb1a21ce45f6ba89af92c7a5345c>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
2. How can we reproduce it?
- Add a MonoBehaviour with a scriptable object as serialized field
- Assign the scriptable object
- Click the “inspect object” icon
4. What version of Unity are you using?
Unity 2022.1.23f1
5. What version of Odin are you using? (See "Tools > Odin Inspector > About")
3.1.8.0 Personal
6. Do you have Editor Only mode enabled?
No
7. What operating system are you on?
Windows Version 10.0.19044 Build 19044