Search Issue Tracker
Fixed in 2021.1.X
Fixed in 2019.4.X, 2020.3.X
Votes
1
Found in
2018.4
2019.3.4f1
2020.2
Issue ID
1270768
Regression
No
[WebGL] AudioSource.Update CPU usage increases overtime when playing AudioSources on Chromium browsers
Reproduction steps:
1. Open the user's attached project
2. Make a WebGL Development Build with Autoconnect Profiler enabled and run it
3. Inspect the CPU usage of "AudioSource.Update" method
4. Let the build run in browser for ~5-10mins (it can be muted)
5. Inspect the CPU usage of "AudioSource.Update" method again
Expected result: CPU usage remains relatively the same
Actual result: CPU usage increases several times (from ~0.3ms to ~3ms and more)
Reproducible with: 2018.4.26f1, 2019.4.9f1, 2020.1.4f1, 2020.2.0a21
Reproducible with Chrome (84.0.4147.135), Edge (84.0.522.63)
Does not reproduce on Firefox (79.0)
Notes:
1. Stopping and then resuming playing audio tracks do not decrease CPU usage
2. In Chrome's profiler, "_JS_Sound_SetPosition" function shows up a lot
3. On 2020.2.0a21, audio tracks cannot be heard, and Audio Voices count increases rapidly in the Profiler. After a few seconds "Autoconnected Player Ran out of virtual channels. Audio clip "pistol - Copy" will not be played." warnings start to be thrown repeatedly
Comments (2)
-
rendermouse
Nov 09, 2021 15:13
I have a looping music track in a Unity 2019.4 WebGL project, and it starts to steadily increase noise and static after 2 minutes or so, until it becomes a horrible mess.
-
fnnbrr
Aug 07, 2021 15:49
Is there an ETA for this fix coming to 2019.4.X? The latest Chromium update has made this issue far more prevalent and live titles (Betrayal IO, for example) are unplayable after an hour due to this bug.
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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note (fix version 2021.1):
Root cause turned out to be a performance bug in Chrome, but there is a local workaround we can apply. For more information, check out https://bugs.chromium.org/p/chromium/issues/detail?id=1133233.
Fixed in 2021.1.0a1
Resolution Note (fix version 2019.4):
Fixed in 2019.4.35f1