diff options
author | Lyuma <xn.lyuma@gmail.com> | 2021-10-28 19:45:29 -0700 |
---|---|---|
committer | Lyuma <xn.lyuma@gmail.com> | 2021-10-28 19:45:29 -0700 |
commit | c088a2dd897de6c20ac8f5563700f3e455aa818b (patch) | |
tree | 2e334fbb2524374db3858fd23036c025fd4e1550 /doc/classes/Window.xml | |
parent | d3547be9ae8ae8bfbbece4757fc0759b712354a7 (diff) |
Fix crash due to reentrancy in AudioStreamPlayer* finished signal.
This crash occurred when an audio stream finished playing in NOTIFICATION_INTERNAL_PROCESS,
during which it would iterate through a loop of playbacks,
leading to a "finished" signal, which removed the audio player from the tree
which led to a NOTIFICATION_EXIT_TREE,
which would mutate the array of playbacks while within the above loop.
This moves the signal callback outside of the loop which avoids the crash.
Note: previously, the signal was called multiple times if the same player finishes multiple times in one frame. Now it is at most once per frame.
Affects AudioStreamPlayer, AudioStreamPlayer2D and AudioStreamPlayer3D
Diffstat (limited to 'doc/classes/Window.xml')
0 files changed, 0 insertions, 0 deletions