Search Issue Tracker

Fixed

Fixed in 2023.2.18f1, 6000.0.0b11

Votes

0

Found in

2023.2.8f1

2023.3.0b8

6000.0.0b11

Issue ID

UUM-63858

Regression

Yes

Audio Random Container window throws a NullReferenceException if docked when editing a script

--

-

*Steps to reproduce:*
# Create and open an empty project.
# Create a C# script (Assets > Create > C# Script).
# Open the C# script in any code editor (to edit later).
# Create an Audio Random Container (abbr. ARC) (Assets > Create > Audio > Audio Random Container).
# Open the ARC asset by double-clicking on it. Make sure the ARC window is closed before opening it.
# Dock the ARC window. Make sure that the ARC asset is highlighted in the Project window, so that it is showing in the ARC window.
# Edit the C# script in any way you please.
# Switch back to Unity with cmd+tab / ctrl+tab. This is to make sure the ARC window keeps showing the asset.
# If no error appears in the console, repeat steps 5-8 until it does. Try to dock the window in various docking areas.

*Actual results:* A null reference error is thrown in the console

*Expected results:* No error is thrown in the console

*Reproducible with versions:* 2023.2.8f1, 2023.3.0b8

*Can’t test with versions:* 2022.3.X, 2021.3.X

*Tested on (OS):* MacOS (M1) Ventura 13.6.4

*Stack trace*

 
{code:java}
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.AudioContainerWindow.UpdateTransportButtonStates () (at /Users/bokken/build/output/unity/unity/Editor/Mono/Audio/AudioContainerWindow.cs:404)
UnityEditor.AudioContainerWindow.BindAndTrackPreviewProperties () (at /Users/bokken/build/output/unity/unity/Editor/Mono/Audio/AudioContainerWindow.cs:369)
UnityEditor.AudioContainerWindow.BindAndTrackObjectAndProperties () (at /Users/bokken/build/output/unity/unity/Editor/Mono/Audio/AudioContainerWindow.cs:292)
UnityEditor.AudioContainerWindow.CreateGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/Audio/AudioContainerWindow.cs:228)
UnityEditor.AudioContainerWindow.OnTargetChanged (System.Object sender, System.EventArgs e) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Audio/AudioContainerWindow.cs:303)
UnityEditor.AudioContainerWindowState.UpdateTarget () (at /Users/bokken/build/output/unity/unity/Editor/Mono/Audio/AudioContainerWindowState.cs:168)
UnityEditor.AudioContainerWindowState.Resume () (at /Users/bokken/build/output/unity/unity/Editor/Mono/Audio/AudioContainerWindowState.cs:97)
UnityEditor.AudioContainerWindow.OnBecameVisible () (at /Users/bokken/build/output/unity/unity/Editor/Mono/Audio/AudioContainerWindow.cs:1209)
UnityEditor.HostView.RegisterSelectedPane (System.Boolean sendEvents) (at /Users/bokken/build/output/unity/unity/Editor/Mono/HostView.cs:609)
UnityEditor.HostView.OnEnable () (at /Users/bokken/build/output/unity/unity/Editor/Mono/HostView.cs:227)
UnityEditor.DockArea.OnEnable () (at /Users/bokken/build/output/unity/unity/Editor/Mono/GUI/DockArea.cs:177) {code}
 

  1. Resolution Note (fix version 6000.0.0b11):

    Improved init/destroy of editor window for AudioRandomcontainer asset to fix null reference exceptions when reloading domain (e.g. when editing scripts).

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.