Search Issue Tracker
By Design
Votes
0
Found in
2020.3.45f1
2021.3.18f1
2022.2.6f1
2023.1.0b3
2023.2.0a1
Issue ID
UUM-26494
Regression
No
AssetBundle allocates more memory when loading it a second time
How to reproduce:
1. Open the attached Project "AssetBundlesLeakRepro"
2. In the Menu Bar, select "Build" -> "CompileBundle"
3. Build and Run the Project for iOS with Development Build checked
4. On a macOS device, run Instruments -> Allocations and debug the running Application on the mobile device
5. In the Build, tap the "Load bundle" -> "Unload bundle" -> "Load bundle" -> "Unload bundle" buttons with some time for the memory usage to appear in Instruments
6. Observe the Memory usage in Instruments
Expected result: Loading the AssetBundle a second time does not make the memory usage increase
Actual result: Loading the AssetBundle a second time uses more memory than the first time and the memory after unloading a bundle does not go down to the initial value
Reproducible with: 2020.3.45f1, 2021.3.18f1, 2022.2.6f1, 2023.1.0b3, 2023.2.0a1
Reproduced on:
- iOS
- Android (user-supplied information)
- MacOS Standalone (user-supplied information)
- Windows Standalone (user-supplied information)
Notes:
- The project is currently set up to build bundles for iOS
- According to the user, iOS shows the largest increase in Allocations and as such, it's easier to see the issue
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
Resolution Note:
Memory increases during the second load because of the expected behavior of an internal data structure (hashmap) and the huge number of objects loaded in the assetbundle. The first load reaches close to a capacity tipping point (45%) but then the second load happens to surpass that limit, hence the visibly larger allocation. The memory profiler snapshots are also part of the memory usage reported.