Skip to content
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

Restarting pulse audio results in bad state error spam #54584

Open
Tracked by #76797
TBleader opened this issue Nov 4, 2021 · 3 comments
Open
Tracked by #76797

Restarting pulse audio results in bad state error spam #54584

TBleader opened this issue Nov 4, 2021 · 3 comments

Comments

@TBleader
Copy link

TBleader commented Nov 4, 2021

Godot version

3.3.4-stable

System information

Linux

Issue description

If you do pulseaudio -k and it restarts (either because it auto restarts or you manually restart it if yours doesn't auto restart) then Godot begins to spam
ERROR: thread_func: pa_context_get_server_info error: Bad state At: drivers/pulseaudio/audio_driver_pulseaudio.cpp:490.
Now, killing the audio service very much would cause an issue. I have no idea if reconnecting to an audio service after it is killed is even a feasible thing, admittedly I am not aware of any applications that actually do this. Most just cease audio capabilities. Hence, if this is considered less of a bug and more of a "yeah fixing that by having it reconnect to the audio service isn't possible" then feel free to close this! It's certainly a 'niche' bug in any case.

but it would be kinda cool I guess if it could.

Steps to reproduce

Start any Godot thing (editor, a game, whatever)
run pulseaudio -k
Godot complains
restart pulseaudio if it hasn't automatically done it for you
Godot contains to complain, meaning you must restart it to fix it and get audio back

Minimal reproduction project

can be reproduced in the editor

@Calinou
Copy link
Member

Calinou commented Nov 4, 2021

Can you reproduce this in Godot 3.2.3, which used a different method to load in PulseAudio?

Also, can you reproduce this if you start Godot with the --audio-driver ALSA command line argument? You can edit Main Run Args in the Project Settings to make a project run with specific CLI arguments when launched from the editor.

@TBleader
Copy link
Author

TBleader commented Nov 4, 2021

Can you reproduce this in Godot 3.2.3, which used a different method to load in PulseAudio?

Yes:
ERROR: thread_func: pa_context_get_server_info error At: drivers/pulseaudio/audio_driver_pulseaudio.cpp:444.

Also, can you reproduce this if you start Godot with the --audio-driver ALSA command line argument? You can edit Main Run Args in the Project Settings to make a project run with specific CLI arguments when launched from the editor.

Yes, when running with --audio-driver ALSA I was able to reproduce it as well. This is on v3.3.4-stable
ERROR: thread_func: pa_context_get_server_info error: Bad state At: drivers/pulseaudio/audio_driver_pulseaudio.cpp:490.

@Draluy
Copy link

Draluy commented Apr 6, 2024

I just reproduced it on 4.2.1 stable.

After doing:
pulseaudio -k && pulseaudio --start

Then when i start my game with the play button from the editor, the game spams:

drivers/pulseaudio/audio_driver_pulseaudio.cpp:508 - pa_context_get_server_info error: Bad state

Restarting godot fixes the issue. I would expect godot to try to reconnect at the start of the game, and not keep a dangling connection that it passes to the game.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants