Search Unity

Tracking down various Addressable errors

Discussion in 'Addressables' started by fendercodes, Sep 26, 2021.

  1. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    191
    In our remote Unity crash reporting dashboard, we've been getting some Addressables errors that we're finding quite hard to reproduce / track down. Any tips on what would cause any of these?

    Code (csharp):
    1. Exception: Attempting to use an invalid operation handle
    2.  
    3. Managed Stack Trace:
    4.  
    5. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[TObject].get_InternalOp () (at <41bb12ad1ddb4183b2699e0724004456>:0)
    6. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[TObject].get_Result () (at <41bb12ad1ddb4183b2699e0724004456>:0)
    7. UnityEngine.ResourceManagement.ChainOperationTypelessDepedency`1[TObject].OnWrappedCompleted (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[TObject] x) (at <41bb12ad1ddb4183b2699e0724004456>:0)
    8. DelegateList`1[T].Invoke (T res) (at <41bb12ad1ddb4183b2699e0724004456>:0)
    9. UnityEngine.Debug:LogException(Exception)
    10. DelegateList`1:Invoke(AsyncOperationHandle`1)
    11. UnityEngine.ResourceManagement.AsyncOperations.<>c__DisplayClass57_0:<add_CompletedTypeless>b__0(AsyncOperationHandle`1)
    12. DelegateList`1:Invoke(AsyncOperationHandle`1)
    13. UnityEngine.AsyncOperation:InvokeCompletionEvent()

    Code (csharp):
    1. ArgumentNullException: Value cannot be null. Parameter name: key
    2.  
    3. Managed Stack Trace:
    4.  
    5. System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) (at <44afb4564e9347cf99a1865351ea8f4a>:0)
    6. System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) (at <44afb4564e9347cf99a1865351ea8f4a>:0)
    7. UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider.ReleaseInstance (UnityEngine.ResourceManagement.ResourceManager resourceManager, UnityEngine.GameObject instance) (at <41bb12ad1ddb4183b2699e0724004456>:0)
    8. UnityEngine.ResourceManagement.ResourceManager+InstanceOperation.Destroy () (at <41bb12ad1ddb4183b2699e0724004456>:0)
    9. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].DecrementReferenceCount () (at <41bb12ad1ddb4183b2699e0724004456>:0)
    10. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.DecrementReferenceCount () (at <41bb12ad1ddb4183b2699e0724004456>:0)
    11. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.Release () (at <41bb12ad1ddb4183b2699e0724004456>:0)
    12. UnityEngine.ResourceManagement.ResourceManager.Release (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle handle) (at <41bb12ad1ddb4183b2699e0724004456>:0)
    13. UnityEngine.AddressableAssets.AddressablesImpl.Release[TObject] (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[TObject] handle) (at <ac62addc85094c329636b3e8b79866fa>:0)
    14. UnityEngine.AddressableAssets.Addressables.Release[TObject] (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[TObject] handle) (at <ac62addc85094c329636b3e8b79866fa>:0)
    15. CharacterLoader.ReleaseHandles () (at <b7b9302942cf46ef807a5da8bd0c4b63>:0)
    16. CharacterLoader.OnOutfit () (at <b7b9302942cf46ef807a5da8bd0c4b63>:0)
    17. Photon.Bolt.NetworkState.InvokeCallbacksForProperty (System.Int32 propertyIndex) (at <f836c5358149442a83d2ae34cc07cd9d>:0)
    18. UnityEngine.Debug:LogException(Exception)
    19. Photon.Bolt.Utils.BoltLog:Exception(Exception)
    20. Photon.Bolt.NetworkState:InvokeCallbacksForProperty(Int32)
    21. Photon.Bolt.NetworkState:InvokeCallbacks()
    22. Photon.Bolt.NetworkState:Photon.Bolt.IEntitySerializer.OnSimulateBefore()
    23. Photon.Bolt.Entity:Simulate()
    24. Photon.Bolt.BoltConnection:StepRemoteEntities()
    25. Photon.Bolt.Internal.BoltCore:StepNonControlledRemoteEntities()
    26. Photon.Bolt.Internal.BoltCore:Poll()
    27. Photon.Bolt.Internal.BoltPoll:FixedUpdate()

    Code (csharp):
    1. Exception: Cannot decrement reference count for operation UnityEngine.ResourceManagement.ResourceManager+InstanceOperation, result='', status='None' because it is already 0
    2.  
    3. Managed Stack Trace:
    4.  
    5. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].DecrementReferenceCount () (at <41bb12ad1ddb4183b2699e0724004456>:0)
    6. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation.DecrementReferenceCount () (at <41bb12ad1ddb4183b2699e0724004456>:0)
    7. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.Release () (at <41bb12ad1ddb4183b2699e0724004456>:0)
    8. UnityEngine.ResourceManagement.ResourceManager.Release (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle handle) (at <41bb12ad1ddb4183b2699e0724004456>:0)
    9. UnityEngine.AddressableAssets.AddressablesImpl.Release[TObject] (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[TObject] handle) (at <ac62addc85094c329636b3e8b79866fa>:0)
    10. UnityEngine.AddressableAssets.Addressables.Release[TObject] (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[TObject] handle) (at <ac62addc85094c329636b3e8b79866fa>:0)
    11. OutfitPreviewLoader.Release () (at <b7b9302942cf46ef807a5da8bd0c4b63>:0)
    12. OutfitPreviewLoader.Clear () (at <b7b9302942cf46ef807a5da8bd0c4b63>:0)
    13. OutfitPreviewLoader+<PreviewInternal>d__16.MoveNext () (at <b7b9302942cf46ef807a5da8bd0c4b63>:0)
    14. UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <c58bc064d0ed420cb832da9d6d1cf9b6>:0)
    15. UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    16. OutfitPreviewLoader:Preview(String, String, String)
    17. Horror.Menu:ShowOutfitPreview(CharacterOutfit)
    18. Horror.Menu:SelectOutfit(UIOutfitSelectionType, SurvivalLobbyController)
    19. Horror.<>c__DisplayClass344_0:<SetupOutfit>b__0()
    20. UnityEngine.EventSystems.EventSystem:Update()
    21.  
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,820
    Which version of Addressables are you using?
     
  3. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    191
    1.18.15
     
  4. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,820
    Thanks. I'll flag with the team!
     
  5. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    191
    Thanks. Is there any elevated support where we can keep in touch in regards to this via email etc? (We're a studio on Unity Pro) It's affecting a somewhat large number of our users in production so we'd like to ensure its addressed as soon as we can.
     
  6. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    Hey, so in regards to these errors it's difficult for me to give you any kind of useful info without more context. The invalid handle error is commonly seen when attempting to access the .Result of an AsyncOperationHandle after calling Addressables.Release, or if you're using an API that has and "autoReleaseHandle" parameter and it's using true (which is almost always the default value). There are many other cases but this is the most common.

    The others, especially the last one, look like the result of a handle getting released too many times. It could be because you're trying to release a handle that is passing true to the "autoReleaseHandle" parameter, or otherwise somehow Release is getting called multiple times on the same handle.

    As far as an elevated support, we do have Enterprise Support: https://store.unity.com/products/unity-enterprise which assigns a relations manager to your team and they are used to push your tickets to a higher priority and manage communications. I'm not versed in what all that level of support does and doesn't get you but it might be worth looking into. I'm actually not sure if Unity Pro licenses come with elevated support. @TreyK-47 maybe it would be worth pointing someone that handles customer support to this thread to address that question.
     
  7. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,820
    Sounds good! I'll connect with the Success team and see if someone can take a look!