Search Unity

Resolved Addressables won't build: memory leak?

Discussion in 'Addressables' started by rab, Sep 30, 2020.

  1. rab

    rab

    Joined:
    Nov 13, 2009
    Posts:
    101
    Hello Unity,

    I am working on the conversion of two Unity5 Projects to 2019.4.11 recently. Both projects are quite big (a lot of texture and model data were stored as AssetBundles). The first test project conversion went fine (GlobeViewer Moon with around 2.600 surface tiles).

    The bigger project with Earths surface data does not work (GlobeViewer with 23.000 surface tiles). All prefabs with the texture and model components are now defined as Addressables. Unfortunately the system runs out of RAM when trying to build the addressable files. Unity shows "Collecting Asset Dependencies" and fills up all RAM and crashes. There are 32 GB RAM on my system and building the AssetBundles with Unity 5.6 worked on all those assets.

    Is this a known bug or something new which needs bug reporting?

    Thank you and kind regards!

    Packages:
    com.unity.scriptablebuildpipeline: 1.12.0
    com.unity.addressables: 1.16.1

    Unity 2019.4.11f1 (64-bit)


    Last lines of the editor log show:


    Stacktrace:
    at <unknown> <0xffffffff>
    at (wrapper managed-to-native)
    UnityEditor.Build.Content.ContentBuildInterface.GetPlayerDependenciesForObjects
    (UnityEditor.Build.Content.ObjectIdentifier[],UnityEditor.BuildTarget,UnityEditor.Build.Player.TypeDB) [0x00009] in <007193b7fa9c4ad1be5b26df6a654213>:0

    at UnityEditor.Build.Pipeline.Tasks.CalculateAssetDependencyData.RunInternal
    (UnityEditor.Build.Pipeline.Tasks.CalculateAssetDependencyData/TaskInput,UnityEditor.Build.Pipeline.Tasks.CalculateAssetDependencyData/TaskOutput&) [0x0022b] in P:\Aktuelle Projekte\GlobeViewer2019\Library\PackageCache\com.unity.scriptablebuildpipeline@1.12.0\Editor\Tasks\CalculateAssetDependencyData.cs:234

    at UnityEditor.Build.Pipeline.Tasks.CalculateAssetDependencyData.Run
    () [0x000f4] in P:\Aktuelle Projekte\GlobeViewer2019\Library\PackageCache\com.unity.scriptablebuildpipeline@1.12.0\Editor\Tasks\CalculateAssetDependencyData.cs:116
    at UnityEditor.Build.Pipeline.BuildTasksRunner.Run
    (System.Collections.Generic.IList`1<UnityEditor.Build.Pipeline.Interfaces.IBuildTask>,UnityEditor.Build.Pipeline.Interfaces.IBuildContext) [0x000ca] in P:\Aktuelle Projekte\GlobeViewer2019\Library\PackageCache\com.unity.scriptablebuildpipeline@1.12.0\Editor\Shared\BuildTasksRunner.cs:56

    at UnityEditor.Build.Pipeline.ContentPipeline.BuildAssetBundles
    (UnityEditor.Build.Pipeline.Interfaces.IBundleBuildParameters,UnityEditor.Build.Pipeline.Interfaces.IBundleBuildContent,UnityEditor.Build.Pipeline.Interfaces.IBundleBuildResults&,System.Collections.Generic.IList`1<UnityEditor.Build.Pipeline.Interfaces.IBuildTask>,UnityEditor.Build.Pipeline.Interfaces.IContextObject[]) [0x001fe] in P:\Aktuelle Projekte\GlobeViewer2019\Library\PackageCache\com.unity.scriptablebuildpipeline@1.12.0\Editor\ContentPipeline.cs:137
     
    Last edited: Sep 30, 2020
    cdr9042 likes this.
  2. rab

    rab

    Joined:
    Nov 13, 2009
    Posts:
    101
    Hello again,

    I've changed the project to use AssetBundles and the export is working as expected. The process only needs 10 GB of RAM and exports all AssetBundles without problems. So there seems to be a memory leak problem with the dependency check of Addressables.

    Kind regards.
     
    cdr9042 likes this.
  3. alejandro-unity

    alejandro-unity

    Unity Technologies

    Joined:
    Apr 17, 2015
    Posts:
    7
  4. rab

    rab

    Joined:
    Nov 13, 2009
    Posts:
    101
    Hi Alejandro,

    thank you for your reply.

    Unfortunately I can't test this case at the moment due to missing disk space (I would need to copy the project for this test). May be later.

    Another problem with Addressables is that they are strongly dependent on the version they were build with. If I upgrade Unity versions I have to rebuild the Addressables every time - the Addressables build with older Unity versions won't work. This is not needed when using the "old" AssetBundles. They will work also when I upgrade the Unity version. Is Unity aware of this problem?

    Kind regards!
     
  5. rab

    rab

    Joined:
    Nov 13, 2009
    Posts:
    101
    Hello Alejandro,

    sorry for this late answer, but the problem is gone. After 4.5 hours all Addressables were created successfully.

    Thanks Unity!