„ERR_EVENT_NOTFOUND for STUDIO_SYSTEM“

Hi there, I get this error message for my player actions. I rebuilt the banks, deleted them, created new ones, restarted… but this keeps popping up.

Any clue how this can be fixed?

Unity 2021.1.22, latest Fmod version, windows x64

Thx in advance

Can you please share a full stack trace of the error you are seeing?

[FMOD] System::getBus(bus:/, 000000AF534EE560) returned ERR_EVENT_NOTFOUND for STUDIO_SYSTEM (0x1FFF9F).
UnityEngine.Debug:LogError (object)
FMODUnity.RuntimeUtils:DebugLogError (string) (at Assets/Plugins/FMOD/src/RuntimeUtils.cs:574)
FMODUnity.RuntimeManager:ERROR_CALLBACK (intptr,FMOD.SYSTEM_CALLBACK_TYPE,intptr,intptr,intptr) (at Assets/Plugins/FMOD/src/RuntimeManager.cs:101)
FMOD.Studio.System:getBus (string,FMOD.Studio.Bus&) (at Assets/Plugins/FMOD/src/fmod_studio.cs:444)
FMODUnity.RuntimeManager:ApplyMuteState () (at Assets/Plugins/FMOD/src/RuntimeManager.cs:1337)
FMODUnity.RuntimeManager:Update () (at Assets/Plugins/FMOD/src/RuntimeManager.cs:454)

Can you please tell me how you are loading banks? Are you using Studio Bank Loaders, the RuntimeManager API or by modifying the FMOD Unity Settings?

Hi,
having the same issue here but different unity version (2021.2.7f1 and FMOD Studio 2.02.05).
FMOD Integration plugin is 2.02.07.
I’m using Scripting API Reference and the load async example code (snippet below). Same error even if trying with Studio Bank Loaders.

[…]
foreach (var bank in Banks)
{
FMODUnity.RuntimeManager.LoadBank(bank, true);
}
[…]

I’ve tried to regenerate build, under streamingasset folder bank file is present. Now I’m trying to rebuild the whole project.
The problem seems to disappear if loading from FMOD Unity Settings.

If it is working on editor and windows build, on Android system this is failing with the same error even if using FMOD Unity Settings

If you are loading banks asynchronously and are still getting FMOD_ERR_EVENT_NOTFOUND then that means the banks haven’t finished loading. Can you please confirm that you are waiting for FMODUnity.RuntimeManager.HaveAllBanksLoaded to return true before playing any events?
There was a bug when loading banks asynchronously via TextAsset or AssetReference which was resolved in 2.02.08, so if you are using Addressables / Asset Bundles then updating to 2.02.08 or later should resolve this issue.

Hi, I’m not using Addressables/Asset Bundles, I’m using streaming assets.
I’m waiting using this statement when waiting for synced loading.

 while ( RuntimeManager.AnySampleDataLoading() || !FMODUnity.RuntimeManager.HasBankLoaded("main") )
            {
                count++;
                yield return null;
            }

This when I’m waiting for async loading.

 // Keep yielding the co-routine until all the sample data loading is done
                while (FMODUnity.RuntimeManager.AnyBankLoading())
                {
                    count++;
                    yield return null;
                }

I’m trying to wait also for HaveAllBanksLoaded property to be true as you suggested.

Hi,

Have you seen our Asynchronous loading example? (Unity Integration | Scripting Examples) It outlines the process for loading banks without using Addressables/Asset Bundles.

I added the example script and now I’m going on this error.
I use abb and split application binary flag due to the size of the project.

2023/02/26 16:43:18.851 23284 23313 Error libprocessgroup set_timerslack_ns write failed: Operation not permitted
2023/02/26 16:43:18.852 23284 23313 Error libprocessgroup set_timerslack_ns write failed: Operation not permitted
2023/02/26 16:43:18.852 23284 23313 Error libprocessgroup set_timerslack_ns write failed: Operation not permitted
2023/02/26 16:43:28.512 23284 23318 Error BLASTBufferQueue [SurfaceView[com.atomichorde.coi2/com.unity3d.player.UnityPlayerActivity]#1](f:0,a:6) isEGL=1, mPendingRelease.size()=1, mMaxAcquiredBuffers=4, currentMaxAcquiredBufferCount=2
2023/02/26 16:43:33.052 23284 23313 Error Unity NullReferenceException: Object reference not set to an instance of an object.
2023/02/26 16:43:33.052 23284 23313 Error Unity   at FMOD.Studio.System.loadBankMemory (System.Byte[] buffer, FMOD.Studio.LOAD_BANK_FLAGS flags, FMOD.Studio.Bank& bank) [0x0000b] in E:\RepositoryGIT\AH_MoM_Unity\Assets\Plugins\FMOD\src\fmod_studio.cs:675 
2023/02/26 16:43:33.052 23284 23313 Error Unity   at FMODUnity.RuntimeManager+<loadFromWeb>d__51.MoveNext () [0x00091] in E:\RepositoryGIT\AH_MoM_Unity\Assets\Plugins\FMOD\src\RuntimeManager.cs:777 
2023/02/26 16:43:33.052 23284 23313 Error Unity   at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00027] in \home\bokken\build\output\unity\unity\Runtime\Export\Scripting\Coroutines.cs:17 
2023/02/26 16:43:33.052 23284 23313 Error Unity 
2023/02/26 16:43:33.071 23284 23318 Error BLASTBufferQueue [SurfaceView[com.atomichorde.coi2/com.unity3d.player.UnityPlayerActivity]#1](f:0,a:3) isEGL=1, mPendingRelease.size()=1, mMaxAcquiredBuffers=4, currentMaxAcquiredBufferCount=2
2023/02/26 16:43:33.090 23284 23318 Error BLASTBufferQueue [SurfaceView[com.atomichorde.coi2/com.unity3d.player.UnityPlayerActivity]#1](f:0,a:3) isEGL=1, mPendingRelease.size()=2, mMaxAcquiredBuffers=4, currentMaxAcquiredBufferCount=2
2023/02/26 16:44:43.515 23284 23576 Error OpenGLRenderer EglManager::makeCurrent mED = 0x1, surface = 0x0, mEC = 0xb4000071882a34a0, error = EGL_SUCCESS
2023/02/26 16:44:43.570 23284 23284 Error Surface freeAllBuffers: 1 buffers were freed while being dequeued!
2023/02/26 16:44:43.573 23284 23284 Error BLASTBufferQueue [ViewRootImpl[UnityPlayerActivity]#0](f:0,a:1) Applying pending transactions on dtor 1
2023/02/26 16:44:47.740 23284 23313 Error Surface getSlotFromBufferLocked: unknown buffer: 0xb4000071c8214030
2023/02/26 16:44:47.740 23284 23313 Error IMGSRV :795: QueueCancelBufferWrapper: Failed to cancel buffer 0xb4000071c8203c60 (-22)
2023/02/26 16:44:47.741 23284 23313 Error Surface freeAllBuffers: 1 buffers were freed while being dequeued!
2023/02/26 16:44:47.741 23284 23313 Error BufferQueueProducer [SurfaceView[com.atomichorde.coi2/com.unity3d.player.UnityPlayerActivity]#1(BLAST Consumer)1](id:5af400000001,api:0,p:-1,c:23284) disconnect: not connected (req=1)
2023/02/26 16:47:29.980 23284 23284 Error Surface freeAllBuffers: 1 buffers were freed while being dequeued!

setting a breakpoint to the function listed below (* where I put the break) , I read this path value.
Is it that path correct? if I search for that path I get an error

jar:file:///data/app/~~EJjGQFoIqvNd7nXI5Fe1Cw==/com.atomichorde.coi2-LnGW2G3BoNL0f_vyTBfiDg==/base.apk!/assets/main.bank

private IEnumerator loadFromWeb(string bankPath, string bankName, bool loadSamples)
        {
            byte[] loadWebResult;
            FMOD.RESULT loadResult;

  -> *    UnityEngine.Networking.UnityWebRequest www = UnityEngine.Networking.UnityWebRequest.Get(bankPath); 
            yield return www.SendWebRequest();
            loadWebResult = www.downloadHandler.data;

            LoadedBank loadedBank = new LoadedBank();
            loadResult = Instance.studioSystem.loadBankMemory(loadWebResult, FMOD.Studio.LOAD_BANK_FLAGS.NORMAL, out loadedBank.Bank);
            if (loadResult != FMOD.RESULT.OK)
            {
                RuntimeUtils.DebugLogWarningFormat("[FMOD] loadFromWeb.  Path = {0}, result = {1}.", bankPath, loadResult);
            }
            loadedBankRegister(loadedBank, bankPath, bankName, loadSamples, loadResult);

            RuntimeUtils.DebugLogFormat("[FMOD] Finished loading {0}", bankPath);
        }

Using ADB I’ve tried to check for that path directly on the device, this is the result:

D:\BUILDS\MoM\Android>"F:\Unity\2021.3.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\adb.exe" shell
ls -aR //data/app/~~EJjGQFoIqvNd7nXI5Fe1Cw==/com.atomichorde.coi2-LnGW2G3BoNL0f_vyTBfiDg==
//data/app/~~EJjGQFoIqvNd7nXI5Fe1Cw==/com.atomichorde.coi2-LnGW2G3BoNL0f_vyTBfiDg==:
.
..
base.apk
lib

//data/app/~~EJjGQFoIqvNd7nXI5Fe1Cw==/com.atomichorde.coi2-LnGW2G3BoNL0f_vyTBfiDg==/lib:
.
..
arm64

//data/app/~~EJjGQFoIqvNd7nXI5Fe1Cw==/com.atomichorde.coi2-LnGW2G3BoNL0f_vyTBfiDg==/lib/arm64:
.
..
lib_burst_generated.so
libfmodL.so
libfmodstudioL.so
libil2cpp.so
libmain.so
libresonanceaudio.so
libunity.so

This is the No such file or directory error, searching for the path

D:\BUILDS\MoM\Android>"F:\Unity\2021.3.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\adb.exe" shell
ls -aR //data/app/~~EJjGQFoIqvNd7nXI5Fe1Cw==/com.atomichorde.coi2-LnGW2G3BoNL0f_vyTBfiDg==!/assets/main.bank
ls: //data/app/~~EJjGQFoIqvNd7nXI5Fe1Cw==/com.atomichorde.coi2-LnGW2G3BoNL0f_vyTBfiDg==!/assets/main.bank: No such file
or directory

Hi,

Would it be possible to get the full script to test on my end?