EventNotFoundException only on some devices

I got this error message only on some devices while on some others music plays perfectly.

How can I fix it?

Condition: EventNotFoundException: [FMOD] Event not found ‘event:/Musics/Menu Music’

StackTrace: FMODUnity.RuntimeManager.GetEventDescription (System.String path) FMODUnity.StudioEventEmitter.Lookup () FMODUnity.StudioEventEmitter.Play ()

IntroTransition+<RunTransition>c__Iterator3.MoveNext ()

UnityEngine.Debug:LogException(Exception)

<RunTransition>c__Iterator3:MoveNext()

UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

DetailedStackTrace: at ExManager.HandleException(System.String condition, System.String stackTrace, LogType type)

at UnityEngine.Application.CallLogCallback(System.String logString, System.String stackTrace, LogType type, Boolean invokedOnMainThread)

at UnityEngine.DebugLogHandler.Internal_LogException(System.Exception , UnityEngine.Object )

at UnityEngine.DebugLogHandler.LogException(System.Exception exception, UnityEngine.Object context)

at UnityEngine.Logger.LogException(System.Exception exception, UnityEngine.Object context)

at UnityEngine.Debug.LogException(System.Exception exception)

at IntroTransition+<RunTransition>c__Iterator3.MoveNext()

at UnityEngine.SetupCoroutine.InvokeMoveNext(IEnumerator enumerator, IntPtr returnValueAddress)

BatteryLevel: 0.55

BatteryStatus: Discharging

DeviceModel: samsung SM-G950F

DeviceName: Galaxy S8

DeviceType: Handheld

GraphicsMemorySize: 1024

OperatingSystem: Android OS 8.0.0 / API-26 (R16NW/G950FXXU4CRL3)

OperatingSystemFamily: Other

ProcessorCount: 8

ProcessorFrequency: 2314

ProcessorType: ARMv7 VFPv3 NEON

Version: 2.015

It is difficult to say just from that error but could it be that the banks aren’t loaded or haven’t finished loading when Play is called on the StudioEventEmitter?

How can I prevent this?

It all depends on what the issue is.

You will have to do some debugging to see if you can find out more information.

The first thing I would do is check that the bank has been loaded before the sound is set to play.

I added now the Studio Bank Loader on a Game Object where i previously attached the Studio Event Emitter.

I got now this error from the exception manager class:

Condition: BankLoadException: [FMOD] Could not load bank ‘file:///android_asset/Master Bank.bank’ : ERR_FILE_NOTFOUND : File not found.
StackTrace: FMODUnity.RuntimeManager.loadedBankRegister (LoadedBank loadedBank, System.String bankPath, System.String bankName, Boolean loadSamples, RESULT loadResult) FMODUnity.RuntimeManager.LoadBank (System.String bankName, Boolean loadSamples) FMODUnity.StudioBankLoader.Load ()
UnityEngine.Debug:LogException(Exception)
FMODUnity.StudioBankLoader:Load()
FMODUnity.StudioBankLoader:HandleGameEvent(LoaderGameEvent)
FMODUnity.StudioBankLoader:Start()

DetailedStackTrace: at ExManager.HandleException(System.String condition, System.String stackTrace, LogType type)
at UnityEngine.Application.CallLogCallback(System.String logString, System.String stackTrace, LogType type, Boolean invokedOnMainThread)
at UnityEngine.DebugLogHandler.Internal_LogException(System.Exception , UnityEngine.Object )
at UnityEngine.DebugLogHandler.LogException(System.Exception exception, UnityEngine.Object context)
at UnityEngine.Logger.LogException(System.Exception exception, UnityEngine.Object context)
at UnityEngine.Debug.LogException(System.Exception exception)
at FMODUnity.StudioBankLoader.Load()
at FMODUnity.StudioBankLoader.HandleGameEvent(LoaderGameEvent gameEvent)
at FMODUnity.StudioBankLoader.Start()

BatteryLevel: 0.34
BatteryStatus: Discharging
DeviceModel: HUAWEI PRA-LX1
DeviceName: P8 LITE BELLO
DeviceType: Handheld
DeviceUniqueIdentifier: b0060237b4d33f5eefddc96612583005
GraphicsMemorySize: 1024
OperatingSystem: Android OS 8.0.0 / API-26 (HUAWEIPRA-LX1/378(C02))
OperatingSystemFamily: Other
ProcessorCount: 8
ProcessorFrequency: 2112
ProcessorType: ARMv7 VFPv3 NEON
Version: 2.019

Unfortunately this is happening only on a phone of one of our testers and I don’t have any way on how to debug it… If I run it on my phone it works properly.

What version of Unity are you using?

2018.2.20f