Getting exception with Addressables since 1.2.2

I keep having to revert to 1.1.10 due to this. It’s happened in 1.2.2, 1.2.3 and 1.2.4.

Exception encountered in operation UnityEngine.AddressableAssets.Initialization.InitializationOperation, result='', status='Succeeded' - Chain<AudioMixer,IResourceLocator>: ChainOperation of Type: UnityEngine.Audio.AudioMixer failed because dependent operation failed
Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=c1aeda1c0be902246b83560ee3bdad45
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:LogFormat(LogType, String, Object[])
UnityEngine.Debug:LogErrorFormat(String, Object[])
UnityEngine.AddressableAssets.AddressablesImpl:LogException(AsyncOperationHandle, Exception) (at {Project_Path}\Library\PackageCache\com.unity.addressables@1.2.4\Runtime\AddressablesImpl.cs:150)
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:set_OperationException(Exception) (at {Project_Path}\Library\PackageCache\com.unity.addressables@1.2.4\Runtime\ResourceManager\AsyncOperations\AsyncOperationBase.cs:278)
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:Complete(AudioMixer, Boolean, String) (at {Project_Path}\Library\PackageCache\com.unity.addressables@1.2.4\Runtime\ResourceManager\AsyncOperations\AsyncOperationBase.cs:362)
UnityEngine.ResourceManagement.ChainOperation`2:OnWrappedCompleted(AsyncOperationHandle`1) (at {Project_Path}\Library\PackageCache\com.unity.addressables@1.2.4\Runtime\ResourceManager\AsyncOperations\ChainOperation.cs:44)
DelegateList`1:Invoke(AsyncOperationHandle`1) (at {Project_Path}\Library\PackageCache\com.unity.addressables@1.2.4\Runtime\ResourceManager\Util\DelegateList.cs:69)
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:InvokeCompletionEvent() (at {Project_Path}\Library\PackageCache\com.unity.addressables@1.2.4\Runtime\ResourceManager\AsyncOperations\AsyncOperationBase.cs:314)
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.InvokeCompletionEvent() (at {Project_Path}\Library\PackageCache\com.unity.addressables@1.2.4\Runtime\ResourceManager\AsyncOperations\AsyncOperationBase.cs:452)
UnityEngine.ResourceManagement.ResourceManager:ExecuteDeferredCallbacks() (at {Project_Path}\Library\PackageCache\com.unity.addressables@1.2.4\Runtime\ResourceManager\ResourceManager.cs:751)
UnityEngine.ResourceManagement.ResourceManager:Update(Single) (at {Project_Path}\Library\PackageCache\com.unity.addressables@1.2.4\Runtime\ResourceManager\ResourceManager.cs:778)
MonoBehaviourCallbackHooks:Update() (at {Project_Path}\Library\PackageCache\com.unity.addressables@1.2.4\Runtime\ResourceManager\Util\MonoBehaviourCallbackHooks.cs:19)

Everything works when I’m using 1.1.10. Any ideas for what might’ve changed?

It looks like you are using an AssetReference (hence the key it can’t find looking like a guid). We made some changes to that system in 1.2.x to support sub object references. I’m guessing it’s related to that, but would need some details.
What exact type is the reference?
What type of object is in there?
Have you tried calling Addressables.InitializeAsync first, then doing this asset reference load after the init is done?

If possible, making a bug against unity would be the simplest way for us to repro this and figure it out.

The reference is an AssetReference.
The object is an AudioMixer.

I’ll look up the docs for InitializeAsync and give it a try. Right now I’m passing in the AssetReference to a method that has this code:

Addressables.DownloadDependenciesAsync(assetReference).Completed += onDependencyLoaded;
Addressables.LoadAssetAsync<AudioMixer>(assetReference).Completed += onAssetLoaded;

Thanks for the reply.

It’s still happening, but looking at the inspector field for it, I see something that I didn’t notice previously, and wasn’t there in 1.1.10. It’s likely related to what you mentioned about supporting sub object references. Previously I was loading the entire Mixer and looping through all the groups to cache the group references. Now it appears I need to specify mixer groups? This seems like a better approach, but I’ll have to refactor some stuff to get it working if that’s the case.

In 1.1.10, this didn’t have a secondary dropdown:
5008535--489821--audio-mixer-reference-01.jpg

I’m guessing that’s where it’s failing.

Ok, it’s still happening and I’ve hit a blocker. Attached is a simple repro project that can reproduce the failure.

5013686–490790–addressables-issue-repro-project-01.unitypackage (9.3 KB)

@unity_bill Have there been any updates? This is currently a blocker for us. I was able to get around it for now, but the Mixer Groups aren’t loading from Addressables.

Ah, we must have done something weird with the auido mixer type. Thanks for the repro project. I’ve created a ticket in our system to look at this. It’s high priority, but with our cadence that still likely means at least a couple weeks to have a fix out.

That works, thank you for the update. I’m bypassing the audio mixer loading, so I’ll just focus on other areas for the time being.

@unity_bill Just wanted to check in for an update regarding this defect. Any news? Thanks!

Hey @Glaswyll we actually have a fix for this in our 1.3 version when it releases. There was an issue where we weren’t converting the editor type for AudioMixerGroups to their appropriate runtime type. When that releases here before too long let us know if you’re still having trouble. I believe I actually tested this fix with the project you provided.

1 Like

@davidla_unity That’s great news, thank you for the update! I will definitely report back after it releases.

1 Like

Hey @davidla_unity I wanted to report back confirmation that Addressables v1.3.3 resolved the issue I was seeing. Thank you so much for getting this fixed!

1 Like