-
-
Notifications
You must be signed in to change notification settings - Fork 23.5k
Description
Tested versions
- Reproducible in 4.3-stable, 4.3beta2, and 4.3beta3
- Does not occur in 4.3beta1, or 4.2.2-stable
System information
Godot v4.3.stable - Windows 10.0.22631 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3080 Ti (NVIDIA; 31.0.15.5161) - AMD Ryzen 9 5900X 12-Core Processor (24 Threads)
Issue description
Playing an AudioStream in a web build in 4.3 causes objects to be created that are not freed. A windows build of the same code doesn't cause the same leaks. I could not reproduce this with 4.3beta1, only the release 4.3 build (v4.3.stable.official [77dcf97]).
In games with lots of audio, this will lead to an eventual crash when the object count gets too high for the wasm/webgl buffer code to handle.
Steps to reproduce
Create any kind of AudioStream node, and call play on it.
On web, the object count goes up and never goes back down. Check using Performance.OBJECT_COUNT.
Minimal reproduction project (MRP)
MRP: web-leak-repro.zip
I've uploaded this to itch here with debug symbols and gdscript as text: https://blambear.itch.io/godot-web-audio-leak-bug the password is godot.
You can see the object count keep going up and up.
(Note the pop.mp3 file in here is an audio file I recorded, it's MIT licensed)