fishfolk / jumpy

Tactical 2D shooter in fishy pixels style. Made with Rust-lang 🦀 and Bevy 🪶
https://fishfolk.org/games/jumpy/
Other
1.64k stars 118 forks source link

Unable to launch game due to audio error (0.8.0) #861

Closed orhun closed 10 months ago

orhun commented 10 months ago

Description

When I launch the game, I get:

thread 'main' panicked at /build/.cargo/git/checkouts/bones-b608aa0d074178a4/65d667e/framework_crates/bones_framework/src/render/audio.rs:26:62:
called `Result::unwrap()` on an `Err` value: DefaultStreamConfigError(DeviceNotAvailable)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

To Reproduce

Built the Arch Linux package: https://gitlab.archlinux.org/archlinux/packaging/packages/jumpy/-/blob/main/PKGBUILD?ref_type=heads

With the following patch:

diff --git a/PKGBUILD b/PKGBUILD
index 5c3368f..5f40fbd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,17 +2,17 @@
 # Contributor: kleintux <reg-archlinux AT klein DOT tuxli DOT ch>

 pkgname=jumpy
-pkgver=0.7.0
+pkgver=0.8.0
 pkgrel=1
 pkgdesc="Tactical 2D shooter in fishy pixels style"
 arch=('x86_64')
-url="https://fishfight.org"
+url="https://fishfolk.org/games/jumpy"
 license=('MIT' 'Apache')
 depends=('pkg-config' 'mesa-libgl' 'alsa-lib' 'systemd-libs' 'libudev.so')
 makedepends=('cargo' 'systemd')
 replaces=('fishfight')
 source=("$pkgname-$pkgver.tar.gz::https://github.com/fishfight/jumpy/archive/v$pkgver.tar.gz")
-sha512sums=('17ac4cf7f56d06053f849980f1021d3d14bced08ce090dcad80964ca206f0eff7b29644d25faaa810397467ede0cbd7e15acf0e346903d22ad4221808bfee868')
+sha512sums=('cba835a899a5cee7625407118f87dc8bd10d6e92651b049bab594086382303d61ef6a3204649ad564e0deaeb73594d6f22bf141537b60a070dc0ae21ca20800f')
 options=('!lto')

 prepare() {

No luck.

Expected Behavior

Successful launch.

Additional Context

If I run from main, then I get a different error:

thread 'main' panicked at src/fullscreen.rs:17:65:
called `Option::unwrap()` on a `None` value
Encountered a panic in exclusive system `bones_bevy_renderer::step_bones_game`!
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!

Log Messages

No response

zicklag commented 10 months ago

I believe that https://github.com/fishfolk/bones/pull/243 should fix the error that you got when running off of main.

The audio error seems like something I can't fix directly. If your audio is working for other stuff, we might have to open an issue in kira to figure out what might be causing it.

I can avoid panicking, though, and log an error and just use a dummy audio manager if we can't successfully open the device.

I'll make another PR to do that, and then make one to update Jumpy to include both changes and we can see if that helps anything.

zicklag commented 10 months ago

@orhun I merged some changes that will hopefully fix this, could you try again on the latest main when you get the chance?

orhun commented 10 months ago

Oh yeah, just built jumpy-git from the AUR (against main) and it works fine!

zicklag commented 10 months ago

Yay! Do you think we should release an 0.8.1 to get this fix out?

orhun commented 10 months ago

Absolutely!

zicklag commented 10 months ago

There you go! I love automated release builds. :)

https://github.com/fishfolk/jumpy/releases/tag/v0.8.1

orhun commented 10 months ago

This is fixed now but I hit another road block: #865