Search Issue Tracker

Fixed

Fixed in 2022.3.12f1, 2023.1.18f1, 2023.2.0b15, 2023.3.0a10

Votes

43

Found in

2022.3.2f1

2023.1.0b21

2023.2.0a18

2023.3.0a7

Issue ID

UUM-39898

Regression

Yes

"ArgumentNullException" error in the Console when selecting certain ScriptableObjects and entering Play Mode

--

-

How to reproduce:
1. Open the attached project “SORepro“
2. Select the “SO_MsqData“ asset (Assets>SO)
3. Enter Play Mode

Expected result: No error in the Console
Actual result: “ArgumentNullException: Value cannot be null.“ error in the Console

Reproducible with: 2022.2.16f1, 2022.3.2f1, 2023.1.0b12, 2023.1.0b21, 2023.2.0a9, 2023.2.0a18
Not reproducible with: 2021.3.27f1, 2022.2.15f1, 2023.1.0b11, 2023.2.0a8

Reproduced on: macOS 13.4 (Intel), Windows 10 (by reporter)

Comments (10)

  1. gaurav94

    Nov 30, 2023 07:54

    unity 2022.3.10f1
    at time gernerate the issue pop .

    ArgumentNullException: Value cannot be null.
    Parameter name: _unity_self
    UnityEditor.SerializedObject.FindProperty (System.String propertyPath) (at <fe7039efe678478d9c83e73bc6a6566d>:0)
    UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.BindPropertyRelative (UnityEngine.UIElements.IBindable field, UnityEditor.SerializedProperty parentProperty) (at <c91a25f185b743118a39aafa100dff09>:0)
    UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.BindTree (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedProperty parentProperty) (at <c91a25f185b743118a39aafa100dff09>:0)
    UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.ContinueBinding (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedProperty parentProperty) (at <c91a25f185b743118a39aafa100dff09>:0)
    UnityEditor.UIElements.Bindings.DefaultSerializedObjectBindingImplementation+BindingRequest.Bind (UnityEngine.UIElements.VisualElement element) (at <c91a25f185b743118a39aafa100dff09>:0)
    UnityEngine.UIElements.VisualTreeBindingsUpdater.Update () (at <79c7b132c51745cbae03eebea8111c0e>:0)
    UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <79c7b132c51745cbae03eebea8111c0e>:0)
    UnityEngine.UIElements.Panel.UpdateBindings () (at <79c7b132c51745cbae03eebea8111c0e>:0)
    UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.UpdateSchedulers () (at <79c7b132c51745cbae03eebea8111c0e>:0)
    UnityEngine.UIElements.UIEventRegistration.UpdateSchedulers () (at <79c7b132c51745cbae03eebea8111c0e>:0)
    UnityEditor.RetainedMode.UpdateSchedulers () (at <c91a25f185b743118a39aafa100dff09>:0)

  2. spakment

    Oct 25, 2023 09:54

    This is not fixed in 2022.3.11 LTS.
    I'm getting this issue in 2022.3.11 LTS - when ScriptableObject is selected and enter play mode

  3. Kristina_B

    Oct 13, 2023 23:54

    Tested what HOWLER123 says, and reproduced.
    Also deleting the scriptable object created in Unity 2022.3.7f1 "fixes" the issue. Scriptable objects that were created before upgrading to Unity2022.3.X don't cause the issue.

  4. Pruthin

    Oct 08, 2023 17:10

    I'm seeing this issue in version 2022.3.0f1

  5. AveSeca

    Sep 10, 2023 18:45

    2022.3.8f1
    This bug still happens

  6. mle_ii

    Sep 09, 2023 16:31

    One additional note as a workaround for folks hitting this, so long as we're hitting the same issue.

    If I just make sure that the SO isn't selected in the Inspector, so either make sure nothing is selected by clicking somewhere where an item isn't in the editor or selecting an object of any other type besides the SO, the Exception doesn't occur for me.

  7. mle_ii

    Sep 09, 2023 16:26

    I'm on the latest version and reproducing this or a similar issue.

    Version 2022.3.9f1

    REPRO:
    Create a new project 2D Core
    After it's done creating in the Editor right click on Assets and create a new script.
    Open the script in a code editor
    Add the following code to the script

    using UnityEngine;

    [CreateAssetMenu(menuName = "TestSO")]
    public class TestSO : ScriptableObject {
    public Color testColor;
    }

    Save the file
    Go back to the Unity editor and wait for it to finish adding the script
    Right click on Assets and create a new "TestSO" Scriptable object
    Click on Play, keeping that SO selected in the inspector after you created it

    RESULTS:
    Go to the console and see an ArgumentNullException

    EXCEPTION:
    ArgumentNullException: Value cannot be null.
    Parameter name: _unity_self
    UnityEditor.SerializedObject.FindProperty (System.String propertyPath) (at <2e279d988b9d4542841de511fbfdf8c2>:0)
    UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.BindPropertyRelative (UnityEngine.UIElements.IBindable field, UnityEditor.SerializedProperty parentProperty) (at <f1c028bf8ba8480dbbae6f023d0e205d>:0)
    UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.BindTree (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedProperty parentProperty) (at <f1c028bf8ba8480dbbae6f023d0e205d>:0)
    UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.ContinueBinding (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedProperty parentProperty) (at <f1c028bf8ba8480dbbae6f023d0e205d>:0)
    UnityEditor.UIElements.Bindings.DefaultSerializedObjectBindingImplementation+BindingRequest.Bind (UnityEngine.UIElements.VisualElement element) (at <f1c028bf8ba8480dbbae6f023d0e205d>:0)
    UnityEngine.UIElements.VisualTreeBindingsUpdater.Update () (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
    UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
    UnityEngine.UIElements.Panel.UpdateBindings () (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
    UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.UpdateSchedulers () (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
    UnityEngine.UIElements.UIEventRegistration.UpdateSchedulers () (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
    UnityEditor.RetainedMode.UpdateSchedulers () (at <f1c028bf8ba8480dbbae6f023d0e205d>:0)

    OTHER NOTES:
    I wasn't able to repro with 3D Core but maybe I just missed something
    I wasn't able to reproduce by just using something like an int in the ScriptableObject, so could be it won't repro with reference type objects, or maybe it's something to do with the visual aspect of the color type in the editor.

  8. samaelxxi

    Aug 19, 2023 17:53

    Same bug when an ScriptableObject is selected in Inspector and Play pressed. 2022.3.7f1

  9. SoftwareGeezers

    Aug 04, 2023 12:18

    2022.3.1f1.

    I have a controller object with a 'Don't Destroy on Load' and several management scripts, no use of Scriptable Objects. If I have it selected in the inspector and play, I get 16 of these errors. If I select a different object and play, no errors. If while running I select this object, also no errors.

    My guess is as the object moves to DontDestroyOnLoad, the inspector has lot all its pointers for a draw.

  10. howler123

    Jun 10, 2023 14:24

    Until I started adding Scriptable Objects I did not have this error. Unity 2022.3.0

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.