Search Issue Tracker

Fixed

Fixed in 2023.2.8f1, 2023.3.0b5

Votes

0

Found in

2023.2.0f1

2023.3.0a15

Issue ID

UUM-55731

Regression

Yes

[Error] Creating an audio source throws an error

--

-

The console throws an error when creating or selecting a game object with an audio source after domain reload or entering play mode.

*Regression details*

Regressed in [38905|https://github.cds.internal.unity3d.com/unity/unity/pull/38905], which fixes a similar issue where selecting a game object with an audio source threw an error, but without the step of triggering a domain reload or entering play mode.

*Repro*
# Open the ARC window (Window > Audio > Audio Random Container)
# Dock the ARC window next to the scene view
# Click on the scene view tab to make it back in focus, so that the ARC window is hidden
# Enter play mode
# Exit play mode
# Create an audio source game object (GameObject > Audio > Audio Source)

Expected: No error is thrown in the console

Actual: An ArgumentNullReference error is thrown in the console

*Note*

Selecting and deselecting the game object will also produce the error after going through the repro steps. It will also occur after a domain reload, for example if creating, deleting, or editing a c# script in the project. Furthermore, opening the ARC window again will stop further attempts at triggering the error until you trigger a domain reload again.

*Stack trace*
{code:java}
ArgumentNullException: Value cannot be null. Parameter name: element UnityEditor.UIElements.Bindings.DefaultSerializedObjectBindingImplementation.UnbindTree (UnityEngine.UIElements.VisualElement element) (at /Users/kristinnbragi/gitrepo/23.2/Modules/UIElementsEditor/Bindings/BindingExtensions.cs:871) UnityEditor.UIElements.Bindings.DefaultSerializedObjectBindingImplementation.Unbind (UnityEngine.UIElements.VisualElement element) (at /Users/kristinnbragi/gitrepo/23.2/Modules/UIElementsEditor/Bindings/BindingExtensions.cs:864) UnityEditor.UIElements.BindingExtensions.Unbind (UnityEngine.UIElements.VisualElement element) (at /Users/kristinnbragi/gitrepo/23.2/Editor/Mono/UIElements/Bindings/BindingsInterface.cs:67) UnityEditor.AudioContainerWindowState.UpdateTarget () (at /Users/kristinnbragi/gitrepo/23.2/Editor/Mono/Audio/AudioContainerWindowState.cs:155) UnityEditor.AudioContainerWindowState.OnSelectionChanged () (at /Users/kristinnbragi/gitrepo/23.2/Editor/Mono/Audio/AudioContainerWindowState.cs:298) UnityEditor.Selection.Internal_CallSelectionChanged () (at /Users/kristinnbragi/gitrepo/23.2/Editor/Mono/Selection.cs:38) {code}

  1. Resolution Note (fix version 2023.3.0b5):

    Fixed issue where creating an audio source with the editor window for the AudioRandomContainer asset open, but hidden could throw an error.

  2. Resolution Note (fix version 2023.2.8f1):

    Fixed issue where creating an audio source while the editor window for the AudioRandomContainer asset was open could throw an error.

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.