Search Unity

IndexOutOfRangeException in 18.9

Discussion in 'Addressables' started by sameng, Jun 15, 2021.

  1. sameng

    sameng

    Joined:
    Oct 1, 2014
    Posts:
    184
    New error in Addressables 18.9.

    I'm liking the cached bundles feature. it worked at first.
    Then the second build after updating (ran it immediately after the first) throws this error.
    Third build onwards keeps throwing this error.

    Code (CSharp):
    1. IndexOutOfRangeException: Index was outside the bounds of the array.
    2. UnityEditor.Build.Pipeline.Utilities.USerialize.DeSerializer.GetTypeFromCache (System.Int32 typeNameIndex) (at Library/PackageCache/com.unity.scriptablebuildpipeline@1.19.0/Editor/Utilities/USerialize/DeSerializer.cs:616)
    3. UnityEditor.Build.Pipeline.Utilities.USerialize.DeSerializer.ReadObject (System.Int32 depth) (at Library/PackageCache/com.unity.scriptablebuildpipeline@1.19.0/Editor/Utilities/USerialize/DeSerializer.cs:445)
    4. UnityEditor.Build.Pipeline.Utilities.USerialize.DeSerializer.ReadObject (System.Int32 depth) (at Library/PackageCache/com.unity.scriptablebuildpipeline@1.19.0/Editor/Utilities/USerialize/DeSerializer.cs:468)
    5. UnityEditor.Build.Pipeline.Utilities.USerialize.DeSerializer.DeSerialize[ClassType] (System.IO.Stream stream) (at Library/PackageCache/com.unity.scriptablebuildpipeline@1.19.0/Editor/Utilities/USerialize/DeSerializer.cs:154)
    6. UnityEditor.Build.Pipeline.Utilities.BuildCache+<>c__DisplayClass28_0.<LoadCachedData>b__0 (System.Int32 index) (at Library/PackageCache/com.unity.scriptablebuildpipeline@1.19.0/Editor/Utilities/BuildCache.cs:368)
    7. System.Threading._ThreadPoolWaitCallback:PerformWaitCallback()
    8.  

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEditor.Build.Pipeline.Utilities.BuildCache+<>c__DisplayClass28_0.<LoadCachedData>b__0 (System.Int32 index) (at Library/PackageCache/com.unity.scriptablebuildpipeline@1.19.0/Editor/Utilities/BuildCache.cs:368)
    3. System.Threading._ThreadPoolWaitCallback:PerformWaitCallback()
    4.  
     
  2. sameng

    sameng

    Joined:
    Oct 1, 2014
    Posts:
    184
    I updated to 18.9 from 1.17.17.

    I've tried the build 4 times so far. Sometimes I get more NullReferenceExceptions than other times... very odd.

    My project works well on 1.17.17 with zero errors, so I'm reverting back to that version.

    I have over 500+ addressable groups. In the future, if there were a better error that pointed towards which assets or groups are failing, I would be happy to try and help repro this.
     
  3. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,822