-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Bevy crashes when not found any audio device #850
Comments
Can you provide a minimal code example? I guess that for Bevy developers it's probably quite straightforward to find the problem source, but I'm curious about what are the plugins involved. Before continuing, I'm using Bevy v0.3, on Ubuntu 20.04, without docker or anything like that. I actually came here to write about another less problematic bug, but probably related. When I use
This is another panic message that appears when I try to terminate the program by closing its window (instead of typing Ctrl+C on the command line, which does not trigger it):
|
This happened to me as well. I had ALSA configured to use a sound card that wasn't connected. I would be very surprised if the minimal example isn't just using the AudioPlugin. |
I encountered same panic lately when I was trying out Bevy. I'm using Bevy v0.3 on Arch 5.8.12-arch1-1 without docker, I'm able to reproduce it every time with following minimal example(AudioPlugin alone is enough to cause this but we will get other panics without rest of plugins). It happens when we do not have default sound card set. Minimal code example
Backtrace
Workaround for this issue on Arch is to set default sound card ( https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture#Set_the_default_sound_card ), tried setting sound card order via kernel module and it solves issue. |
I'm running Arch and also have this issue however I can't seem to fix it, maybe my ALSA setup is completely broken and I haven't noticed it until now (everything except this is working fine) or a more in-depth solution would be appreciated. |
I'm a arch user to and have the same issue, I following the getting started tutorial when this happens https://bevyengine.org/learn/book/getting-started/plugins/ App::build()
.add_plugins(DefaultPlugins)
.add_startup_system(add_people.system())
.add_system(hello_world.system())
.add_system(greet_people.system())
.run(); OBS: i installed the dependencies libx11 pkgconf alsa-lib |
Installing |
I have |
@samuel-cavalcanti I'm not sure if following the guide above helped too, because I first tried to add the |
Wtf ?! reinstalling the package works . |
I work out a solution for ubuntu container (20.04) without audio device:
|
I have noticed this same issue on many different machines. I don't think this is as much a driver issue as it is a problem that should be addressed with Bevy. Bevy should opt out of audio before crashing, or at least, it should allow the developer to make this decision. Many applications and even games are fine without audio and a developer shouldn't have to offer two versions of a program (one with and one without audio dependencies). I know there has been discussion to change the audio system in Bevy, perhaps this should be addressed there? @Moxinilian @Dash-L |
Yeah I agree that Bevy shouldn't crash in this case. Ideally it just displays an error message when a device can't be found (and probably when audio is played but no device is available). Additionally, it would be great if it could gracefully respond to devices being connected / defaults being switched. |
This issue is present in Windows as well, although the error message is different.
While it's probably not super common to not have an audio device, it definitely should not cause a crash. |
Bevy version
Operating system & version
Ubuntu 20.10 docker
What you did
I wanted to run bevy inside ubuntu docker image
What you expected to happen
App should open properly
What actually happened
This error was shown and later crash happens
Additional information
When not found audio device, bevy shouldn't crash but only show error - RustAudio/rodio#334
Steps to reproduce
apt install xvfb
cargo run --example clear_color
(it is a little strange that this example needs audio)xvfb-run target/debug/examples/clear_color
The text was updated successfully, but these errors were encountered: