-
-
Notifications
You must be signed in to change notification settings - Fork 20.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio samples leaks #96068
Comments
Examples below of crash error output when the object count gets too high, for me this happens when the object count hits around 50k. Firefox
Chrome
|
Tried with 4.3beta2 and 4.3beta3, both seem to reproduce the issue with the object count going up and up. So it seems the issue was introduced between beta1 and beta2. |
4.3-beta2 is the release where audio sample playback was added for the web platform, so that's probably where the bug originates. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
changing the audiostreamplayer playback type to sample has the same leaked object behavior when run in the editor |
Just for reference, I've uploaded versions exported from 4.3-beta1 and 4.3beta-2 to itch.io: https://blambear.itch.io/web-leak-test-4-3-beta1 Password for both is again On my machine, in Firefox (131.0a1) and Chrome (128.0.6613.86), I get a stable object count in beta1 and a consistently increasing object count in beta2. |
I can reproduce this, using the first of the two itch.io links ( Chrome does not reproduce for this version, for me, on macOS. trim.53DCD032-625F-492E-9843-CD85F94C56B8.MOV |
Okay Good luck everyone, it's a big diff! 😌
MethodologySteps
Observations:
|
@wheatear-dev Yes, it's when I added samples support. I'll investigate this beginning of next week. |
#96572 should fix this issue. Now, the MRP's object numbers stay stable, whether the game runs on a desktop (with samples forced) or on the Web. |
This is a pretty serious bug with 4.3, will it be cherry-picked for a patch? |
This is in 4.4.dev2, tested and it's fixed for me. |
Tested versions
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)
The text was updated successfully, but these errors were encountered: