Errors in build and in build pipeline

We currently use a build machine to run off builds. During the build there are multiple errors generated:

FMOD Studio: Encountered Error: ERR_OUTPUT_INIT Error initializing output device.
FMOD Studio: Encountered Error: ERR_INVALID_HANDLE An invalid object handle was used.
FMOD Studio: Encountered Error: ERR_INVALID_PARAM An invalid parameter was passed to this function.
FMOD Studio: Encountered Error: ERR_INVALID_PARAM An invalid parameter was passed to this function.
FMOD Studio: Encountered Error: ERR_INVALID_HANDLE An invalid object handle was used.
FMOD: Bank refresh failed: <PROJECT-ROOT>/Build/Oculus\Master.strings.bank is not a valid bank.

This is a response to a prebuild action we call to refresh banks to try and have them copy into build. This actions contains the following:

FMODUnity.EventManager.Startup();

In the build we’re getting various exceptions of which the primary one I think is:

06-06 13:07:51.583 14850 14879 E Unity   : NullReferenceException: Object reference not set to an instance of an object.
06-06 13:07:51.583 14850 14879 E Unity   :   at FMOD.Studio.System.loadBankMemory

On startup we are also awaiting all banks being loaded:

await UniTask.WaitUntil(()=>FMODUnity.RuntimeManager.HaveAllBanksLoaded);

The Build server appears to have the strings file in the right path. All the banks exists. This works on peoples local editor and if they build locally. We’re also using OBB’s and have manually set use OBB’s to true. Additionally we’re having problems with the PS5 build also so its not just an android issue:

EventNotFoundException: [FMOD] Event not found: {9b094aa9-0203-41cd-a7d1-88931b9fe6f8}
BankLoadException: [FMOD] Could not load bank '/app0/Media/StreamingAssets/<BANK_NAME>.bank' : ERR_FILE_NOTFOUND : File not found.

Hi,

What version of FMOD and Unity are you using?

This issue can be caused if the build machine does not have a valid output device, for example, a sound card. Please confirm that the build device has a valid output alternatively, a solution may be on the build machine setting System::setOutput(FMOD_OUTPUTTYPE_NOSOUND). This will still allow for all FMOD functions to run properly without the need for an output device. The setOutput() documentation can be found here: FMOD API | Core API Reference - System.

For these issues:

Can I confirm that you are loading the banks in a separate scene to one in which you have your FMOD Studio Event Emitters? As having Event Emitters and Bank Loaders in the same scene can cause these errors.

Are these the same errors you are getting on the PS5 or on all platforms?

Thanks

Hi,

Just checking in if there was a resolution to the issue or if I could assist further?

My apologies, the solution was enabling Windows Audio on the build machine VM. Both a relief and annoying that it was such a simple fix. Hopefully others who use a headless build machine will find this useful down the line.

thanks for the help

2 Likes

Hi, no worries.

Good to hear it is solved and thank you for sharing the solution.