game-ci / docker

Series of CI-specialised docker images for Unity.
https://hub.docker.com/u/unityci
MIT License
397 stars 123 forks source link

Missing `libpulse.so.0` causes test failure when using FMOD #249

Open 12joan opened 1 month ago

12joan commented 1 month ago

Bug description

When testing an app that uses FMOD using game-ci/unity-test-runner, the library libpulse.so.0 is reported as missing, causing the test to fail.

[FMOD] FMOD_OS_Library_Load : dlopen failed to open 'libpulse.so.0', dlerror = libpulse.so.0: cannot open shared object file: No such file or directory

Expected behavior

The libpulse.so.0 library should be available on Ubuntu images, since it's needed by FMOD.

12joan commented 1 month ago

It turns out installing libpulse-dev isn't enough to fix this. I then get an error:

[FMOD] FMOD_PulseAudio_CheckOutputSupport : pa_context_connect returned -1.

I'll keep looking into this and let you know if I find a fix from the Docker image side of things.

FMOD forum post: https://qa.fmod.com/t/getting-pulseaudio-dependency-to-work-in-ubuntu-docker-image/21897

GabLeRoux commented 1 month ago

I don't know much about this, but I would probably try installing libpulse0 and libpulse-mainloop-glib0 too.

It might be interesting to provide a sample project with a test and FMOD installed to reproduce this in a public repository.

12joan commented 1 month ago

It might be interesting to provide a sample project with a test and FMOD installed to reproduce this in a public repository.

I've created a minimal reproduction here: https://github.com/12joan/fmod-game-ci-repro/actions

In the workflow that passes, I've patched FMOD to set its output mode to NOSOUND, preventing it from trying to initialise PulseAudio. This is the workaround I'm using in my game for now.

I don't know much about this, but I would probably try installing libpulse0 and libpulse-mainloop-glib0 too.

Thanks for the advice! Unfortunately, I don't have time to try this right now, but I might take another look at it once we've got FMOD fully integrated into our game.

12joan commented 3 weeks ago

FMOD has fixed this on their end.

A solution has been found and will be included in an upcoming release. [...] Rather than returning an error on failing to open the library, it will just log it as FMOD can still initialize successfully in NOSOUND mode. So you will not have to make any changes.

Should we leave this issue open for discoverability until the fix from FMOD is released?