ArgumentException: Object at index 0 is null

Issue #530 resolved
Vinnie Vivace created an issue

Unity: 2019.1 Odin 2.0.17 Windows 10 Editor Only mode not enabled.

Happens every time I play my scene

ArgumentException: Object at index 0 is null UnityEditor.SerializedObject..ctor (UnityEngine.Object[] objs, UnityEngine.Object context) (at C:/buildslave/unity/build/Editor/Mono/SerializedObject.bindings.cs:39) UnityEditor.Editor.GetSerializedObjectInternal () (at C:/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:553) UnityEditor.Editor.get_serializedObject () (at C:/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:452) UnityEditor.UIElements.InspectorElement..ctor (UnityEditor.Editor editor, UnityEditor.UIElements.InspectorElement+Mode mode) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:133) UnityEditor.UIElements.EditorElement.Init () (at C:/buildslave/unity/build/Editor/Mono/Inspector/EditorElement.cs:84) UnityEditor.UIElements.EditorElement..ctor (System.Int32 editorIndex, UnityEditor.InspectorWindow iw) (at C:/buildslave/unity/build/Editor/Mono/Inspector/EditorElement.cs:62) UnityEditor.InspectorWindow.DrawEditors (UnityEditor.Editor[] editors) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1392) UnityEditor.InspectorWindow.RebuildContentsContainers () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:639) UnityEditor.InspectorWindow.RedrawFromNative () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:311)

Comments (9)

  1. Tor Esa Vestergaard

    Odin is nowhere in that stacktrace, and this appears to be solely an internal Unity issue. What makes you think Odin is involved?

  2. Tor Esa Vestergaard

    I'll assume Odin has nothing to do with this for now. If more information emerges, we can reopen the issue at that time.

  3. Сергей Серёгин

    I have the same issue.

    Unity 2019.1 / Odin 2.0.19 / Window 10

    Empty, fresh project, only OdinInspector is imported. I create empty object, then create new Monobehaviour, add it as a component to empty object and get same errors as OP on start.

    If i remove Odin, no errors. If i import it back, same errors.

  4. Tor Esa Vestergaard

    Have you tried reporting this to Unity? Odin is nowhere in that stacktrace, and I’ve been unable to reproduce so far. I find it likely that the folks at Unity will have a much better idea as to what might be going on.

  5. Сергей Серёгин

    Object with script must be selected, if nothing is selected errors wont show up. Its also looks like any selected object will cause it, not only objects with MonoBehaviour attached to it.

    The thing is - its only happens when Odin is in project. So i dont think its reasonable to put it on Unity, even though its not on stack. Ill try to play with it to get more info.

  6. Tor Esa Vestergaard

    Going by the message and the stacktrace, it’s clearly Unity’s internal error, even if Odin is somehow the cause of conditions that trigger it. I very much doubt we could do anything about this error, even if the direct cause was discovered by us.

  7. Сергей Серёгин

    Hey, i did write to Unity support and find ouy that error is on Unity side, they track it alredy.

    The error only occure if you have multiple Inspector tabs opened.


  8. Log in to comment