# Errors in build and in build pipeline

**URL:** <https://qa.fmod.com/t/errors-in-build-and-in-build-pipeline/20289>\
**Category:** Unity\
**Tags:** android, unity\
**Created:** [June 6, 2023, 1:12pm UTC](https://qa.fmod.com/t/errors-in-build-and-in-build-pipeline/20289 "2023-06-06T13:12:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![XRGamesFMOD](https://avatars.discourse-cdn.com/v4/letter/x/e36b37/32.png) [@XRGamesFMOD](https://qa.fmod.com/u/XRGamesFMOD)\
**Post date:** [June 6, 2023, 1:12pm UTC](https://qa.fmod.com/t/errors-in-build-and-in-build-pipeline/20289/1 "2023-06-06T13:12:52Z")

</div>

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

```auto
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:

```auto
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:

```auto
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:

```auto
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.

```

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [June 7, 2023, 1:32am UTC](https://qa.fmod.com/t/errors-in-build-and-in-build-pipeline/20289/2 "2023-06-07T01:32:19Z")

</div>

Hi,

What version of FMOD and Unity are you using?

> [@XRGamesFMOD](#):
>
> `FMOD Studio: Encountered Error: ERR_OUTPUT_INIT Error initializing output device.`

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](https://fmod.com/docs/2.02/api/core-api-system.html).

For these issues:

> [@XRGamesFMOD](#):
>
> In the build we’re getting various exceptions of which the primary one I think is:
> 
> ```auto
> 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:
> 
> ```auto
> await UniTask.WaitUntil(()=>FMODUnity.RuntimeManager.HaveAllBanksLoaded);
> 
> ```

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.

> [@XRGamesFMOD](#):
>
> we’re having problems with the PS5 build

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

> [@XRGamesFMOD](#):
>
> ```auto
> 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.
> 
> ```

Thanks

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [June 14, 2023, 4:37am UTC](https://qa.fmod.com/t/errors-in-build-and-in-build-pipeline/20289/3 "2023-06-14T04:37:23Z")

</div>

Hi,

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

---

<div class="post-metadata">

**Author:** ![XRGamesFMOD](https://avatars.discourse-cdn.com/v4/letter/x/e36b37/32.png) [@XRGamesFMOD](https://qa.fmod.com/u/XRGamesFMOD)\
**Post date:** [June 14, 2023, 7:30am UTC](https://qa.fmod.com/t/errors-in-build-and-in-build-pipeline/20289/4 "2023-06-14T07:30:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [June 14, 2023, 11:18pm UTC](https://qa.fmod.com/t/errors-in-build-and-in-build-pipeline/20289/5 "2023-06-14T23:18:36Z")

</div>

Hi, no worries.

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