Search Unity

[Bug?] Error when trying load catalog which was loaded before

Discussion in 'Addressables' started by earlGrey_, Apr 6, 2020.

  1. earlGrey_

    earlGrey_

    Joined:
    Jan 30, 2020
    Posts:
    6
    I could try loading some catalog that was loaded before if I don't manually keep track of which catalogs was loaded.. So, when I'm trying to load catalog again with this method Addressables.LoadContentCatalogAsync it throws an error:
    ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: startIndex
    System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <437ba245d8404784b9fbab9b439ac908>:0)
    System.BitConverter.ToInt32 (System.Byte[] value, System.Int32 startIndex) (at <437ba245d8404784b9fbab9b439ac908>:0)
    UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData.CreateLocator (System.String providerSuffix) (at Library/PackageCache/com.unity.addressables@1.7.5/Runtime/ResourceLocators/ContentCatalogData.cs:289)
    UnityEngine.AddressableAssets.Initialization.InitializationOperation.OnCatalogDataLoaded (UnityEngine.AddressableAssets.AddressablesImpl addressables, UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[TObject] op, System.String providerSuffix) (at Library/PackageCache/com.unity.addressables@1.7.5/Runtime/Initialization/InitializationOperation.cs:183)
    UnityEngine.AddressableAssets.Initialization.InitializationOperation+<>c__DisplayClass12_0.<LoadContentCatalog>b__0 (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[TObject] res) (at Library/PackageCache/com.unity.addressables@1.7.5/Runtime/Initialization/InitializationOperation.cs:193)
    UnityEngine.ResourceManagement.ChainOperation`2[TObject,TObjectDependency].Execute () (at Library/PackageCache/com.unity.addressables@1.7.5/Runtime/ResourceManager/AsyncOperations/ChainOperation.cs:34)
    UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].InvokeExecute () (at Library/PackageCache/com.unity.addressables@1.7.5/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs:409)
    UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].Start (UnityEngine.ResourceManagement.ResourceManager rm, UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle dependency, DelegateList`1[T] updateCallbacks) (at Library/PackageCache/com.unity.addressables@1.7.5/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs:403)
    UnityEngine.ResourceManagement.ResourceManager.StartOperation[TObject] (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject] operation, UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle dependency) (at Library/PackageCache/com.unity.addressables@1.7.5/Runtime/ResourceManager/ResourceManager.cs:407)
    UnityEngine.ResourceManagement.ResourceManager.CreateChainOperation[TObject,TObjectDependency] (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[TObject] dependentOp, System.Func`2[T,TResult] callback) (at Library/PackageCache/com.unity.addressables@1.7.5/Runtime/ResourceManager/ResourceManager.cs:645)
    UnityEngine.AddressableAssets.Initialization.InitializationOperation.LoadContentCatalog (UnityEngine.AddressableAssets.AddressablesImpl addressables, UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation loc, System.String providerSuffix) (at Library/PackageCache/com.unity.addressables@1.7.5/Runtime/Initialization/InitializationOperation.cs:193)
    UnityEngine.AddressableAssets.AddressablesImpl.LoadContentCatalogAsync (System.String catalogPath, System.String providerSuffix) (at Library/PackageCache/com.unity.addressables@1.7.5/Runtime/AddressablesImpl.cs:400)
    UnityEngine.AddressableAssets.Addressables.LoadContentCatalogAsync (System.String catalogPath, System.String providerSuffix) (at Library/PackageCache/com.unity.addressables@1.7.5/Runtime/Addressables.cs:258)
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,822
    I'll kick this over to the team to investigate. Which version of Addressables and the editor are you using?
     
  3. earlGrey_

    earlGrey_

    Joined:
    Jan 30, 2020
    Posts:
    6
    Thanks for the reply!
    I'm using 1.7.5
     
  4. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,822
    Spoke with the team, and it looks like this was fixed in 1.8.3.