Search Issue Tracker
Fixed
Fixed in 2021.3.31f1, 2022.3.10f1, 2023.1.18f1, 2023.2.0b15, 2023.3.0a3, 7000.0.0a1
Votes
2
Found in
2021.3.1f1
2022.1.3f1
2022.2.0a13
Issue ID
UUM-2391
Regression
No
[iOS] Non-Streaming Audio Clips loaded from UnityWebRequest retain file reference after unloading
Reproduction steps:
1. Open customer's attached project in "unity-audio-tests.zip"
2. Open AudioTest Scene and build for iOS
3. Deploy the application using Xcode
4. Open Memory Tab (spray can icon -> Memory, check images)
5. Inspect memory use
6. In the application press the Load Audio button (MP3, FMOD.sound)
7. Inspect memory use and press the Unload Audio button
8. Switch FMOD.sound to UnityWebRequest in the application
9. Load Audio and inspect the memory use
Expected result: the increase in memory will be the same as when using FMOD.sound
Actual result: the increase in memory will be double compared to using FMOD.sound (read notes below)
Reproducible with: 2019.4.13f1, 2020.1.11f1, 2020.2.0b10, 2021.1.0a3
Could not test with 2018.4.29f1 because of errors in Unity (multiple assemblies with the same name)
Devices tested:
Reproducible with:
VLNQA00310 iPad Pro 12.9 1st gen (iOS 13.4.1)
VLNQA00204 iPhone 5C (iOS 10.3.3)
I could not test this in Editor because the memory usage would not change
Notes:
1. UnityWebRequest also creates an FMOD.sound but after that, the memory allocated by web request is not deallocated
2. Audio Streaming is set to false
3. Some memory is not being deallocated with the Unload Audio button (it is slowly increasing with each allocation and deallocation)
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
- Shader warning after building a project with URP Sample
- MissingReferenceException after clicking "Fix now" on NormalMap settings
- The "UniversalRenderPipelineGlobalSettings.asset" is creating noise in the git diff when building a Player
- Scene is marked as dirty when opening the project with Vertical Layout Group added as a Component
- Crash on UnityEngine::Animation::SetGenericFloatPropertyValues when keyframing the RigBuilder component to Enabled and Disabled
Resolution Note (fix version 2023.3.0a3):
Fixed a bug where AudioClips loaded via UnityWebRequest would keep two copies of the data, which doubled the memory usage unnecessarily. This was the case for non-streaming AudioClips.
Resolution Note (fix version 2023.2.0b15):
Fixed in: 2023.2.0b15