loadBankMemory return FMOD_ERR_NOTREADY

Please help me, I call loadBankMemory then return FMOD_ERR_NOTREADY

Firstly can you check all your API calls return FMOD_OK?

Secondly, can you share more of your code so we can see what else you are doing?

Also, have you checked our examples? Particularly the load_bank example?
It might show you what’s wrong with your usage.

I get the error in android, but not necessarily, then it will crash!!
10-22 16:51:30.548 1407 1494 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 1494 (FMOD Studio upd)

10-22 16:51:30.556 845 1327 W Bitmap : Called reconfigure on a bitmap that is in use! This may cause graphical corruption!

10-22 16:51:30.558 1407 1457 V threaded_app: New input event: type=2

10-22 16:51:30.570 1407 1457 V threaded_app: New input event: type=2

10-22 16:51:30.594 1407 1457 V threaded_app: New input event: type=2

10-22 16:51:30.613 1407 1457 V threaded_app: New input event: type=2

10-22 16:51:30.629 1407 1457 V threaded_app: New input event: type=2

10-22 16:51:30.647 1407 1457 V threaded_app: New input event: type=2

10-22 16:51:30.656 845 1337 W Bitmap : Called reconfigure on a bitmap that is in use! This may cause graphical corruption!

10-22 16:51:30.657 265 265 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

10-22 16:51:30.657 265 265 F DEBUG : Build fingerprint: ‘OnePlus/OnePlus2/OnePlus2:6.0.1/MMB29M/1447841200:user/release-keys’

10-22 16:51:30.657 265 265 F DEBUG : Revision: ‘0’

10-22 16:51:30.657 265 265 F DEBUG : ABI: ‘x86’

10-22 16:51:30.657 265 265 F DEBUG : pid: 1407, tid: 1494, name: FMOD Studio upd >>> com.komoe.yxxygp <<<

10-22 16:51:30.657 265 265 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0

10-22 16:51:30.661 265 265 F DEBUG : eax 00004300 ebx 86fc4dec ecx 00000001 edx 101b81f0

10-22 16:51:30.661 265 265 F DEBUG : esi 00000000 edi 00000000

10-22 16:51:30.661 265 265 F DEBUG : xcs 00000073 xds 0000007b xes 0000007b xfs 0000003b xss 0000007b

10-22 16:51:30.661 265 265 F DEBUG : eip 0ed9e1b3 ebp 101b8000 esp 9b9a3a70 flags 00210246

10-22 16:51:30.661 265 265 F DEBUG :

10-22 16:51:30.661 265 265 F DEBUG : backtrace:

10-22 16:51:30.661 265 265 F DEBUG : #00 pc 00d421b3

10-22 16:51:30.661 265 265 F DEBUG : #01 pc 0000e03f

10-22 16:51:30.757 845 1311 W Bitmap : Called reconfigure on a bitmap that is in use! This may cause graphical corruption!

10-22 16:51:30.838 265 265 F DEBUG :

I read the load_bank example ,it use byte alignment(FMOD_STUDIO_LOAD_MEMORY_ALIGNMENT), but I not do this,it will cause crash?
thank you!

Incorrect alignment will not cause a crash, it will return an error. Alignment is only required if you are using FMOD_STUDIO_LOAD_MEMORY_POINT. If you are using that flag, ensure you aren’t freeing the memory you pass to FMOD until after you unload the bank (that will cause a crash).

Could you link with the logging “L” version of FMOD to get more information in LogCat?

Also, could you confirm you are checking the FMOD_RESULT from all API calls?

Finally, do you experience any crash when using the example code?

We haven’t run example code in android.
We link with the debug version,we’ll let you know if we have any results.
By the way,we call FMOD API in native thread
Thank you for your help.

hi mathew :
We link with the debug versio, we get a lot of message, but I am not sure it’s right:
I/fmod: SoundI::release : (null) (0x86bb4208)
10-27 21:49:52.616 2677-2752/ I/fmod: SoundI::release : hammer_hit1_03 (0x8a158048)
10-27 21:49:52.616 2677-2752/ I/fmod: SoundI::release : (null) (0x86bb4608)
10-27 21:49:52.616 2677-2752/ I/fmod: SoundI::release : hammer_hit1_04 (0x8a158e08)
10-27 21:49:52.616 2677-2752/ I/fmod: SoundI::release : (null) (0x8ac7b508)
10-27 21:49:52.616 2677-2752/ I/fmod: SoundI::release : 10701_atk01_01 (0x870d8e08)
10-27 21:49:52.616 2677-2752/ I/fmod: SoundI::release : (null) (0x8aacbf08)
10-27 21:49:52.616 2677-2752/ I/fmod: SoundI::release : 10701_atk01_02 (0x870d82c8)
10-27 21:49:52.716 2677-2752/ I/fmod: SoundI::release : (null) (0x8a6eb708)
10-27 21:49:52.716 2677-2752/ I/fmod: SoundI::release : hammer_hit1_05 (0x8a157508)
10-27 21:49:52.716 2677-2752/ I/fmod: SoundI::release : (null) (0x8a6c7408)
10-27 21:49:52.716 2677-2752/ I/fmod: SoundI::release : hammer_hit1_06 (0x89f74008)
FMOD Error: (76) The specified resource is not loaded, so it can’t be unloaded

Soundl::release(null)???
Thank you

I’m seeing a lot of sounds being released, which sounds like you are unloading banks? The “null” you highlight isn’t a concern, it just means the name of the sound was missing.

I feel like before all these release logs there might be an error causing the system to shutdown, unless you are unloading or shutting down yourself? Can you provide the full log? If it’s too long consider calling FMOD::Debug_Initialize(FMOD_DEBUG_LEVEL_WARNING) to limit output to warnings and errors.

Can you confirm you aren’t receiving any errors from API calls?

Yes,I unload banks at event instance be call back (FMOD_STUDIO_EVENT_CALLBACK_STOPPED)
load bank before create event instance.
sometimes,it will return FMOD_ERR_EVENT_NOTFOUND

Hi mathew
We run for a long time,then get the following error:
10-28 13:38:29.462 8760-8808/ E/fmod: assert : assertion: ‘mRefCount >= 0’ failed
10-28 13:38:29.462 8760-8808/ E/fmod: AsyncManager::asyncThreadLoop : System::update returned error 28.
10-28 13:38:29.462 8760-8808/ E/fmod: assert : assertion: ‘mRefCount >= 0’ failed
10-28 13:38:29.462 8760-8808/ E/fmod: AsyncManager::asyncThreadLoop : System::update returned error 28.
10-28 13:38:29.466 8760-8804/ : FMOD Error: (28) An error occurred that wasn’t supposed to. Contact support. in E:/bee/client/trunk/proj.android/…/…/…/…/hero2//engine/proj.android/…/src/audio/AudioManager.cpp at 563
10-28 13:38:29.475 8760-8804 D: FMOD Error: (28) An error occurred that wasn’t supposed to. Contact support. in E:/bee/client/trunk/proj.android/…/…/…/…/hero2//engine/proj.android/…/src/audio/AudioManager.cpp at 563
10-28 13:38:29.475 8760-8804/ D/: FMOD Error: (28) An error occurred that wasn’t supposed to. Contact support. in E:/bee/client/trunk/proj.android/…/…/…/…/hero2//engine/proj.android/…/src/audio/AudioManager.cpp at 594
10-28 13:38:29.475 8760-8804/ D/: FMOD Error: (28) An error occurred that wasn’t supposed to. Contact support. in E:/bee/client/trunk/proj.android/…/…/…/…/hero2//engine/proj.android/…/src/audio/AudioManager.cpp at 594
10-28 13:38:29.483 8760-8804/D/: FMOD Error: (28) An error occurred that wasn’t supposed to. Contact support. in E:/bee/client/trunk/proj.android/…/…/…/…/hero2//engine/proj.android/…/src/audio/AudioManager.cpp at 563
10-28 13:38:29.491 8760-8804/ D/: FMOD Error: (28) An error occurred that wasn’t supposed to. Contact support. in E:/bee/client/trunk/proj.android/…/…/…/…/hero2//engine/proj.android/…/src/audio/AudioManager.cpp at 563
10-28 13:38:29.500 8760-8804/ D/: FMOD Error: (28) An error occurred that wasn’t supposed to. Contact support. in E:/bee/client/trunk/proj.android/…/…/…/…/hero2//engine/proj.android/…/src/audio/AudioManager.cpp at 563
10-28 13:38:29.508 8760-8808/ E/fmod: assert : assertion: ‘mRefCount >= 0’ failed
10-28 13:38:29.508 8760-8808/ E/fmod: AsyncManager::asyncThreadLoop : System::update returned error 28.
10-28 13:38:29.508 8760-8808/ E/fmod: assert : assertion: ‘mRefCount >= 0’ failed
10-28 13:38:29.508 8760-8808/ E/fmod: AsyncManager::asyncThreadLoop : System::update returned error 28.
10-28 13:38:29.508 8760-8804/ D: FMOD Error: (28) An error occurred that wasn’t supposed to. Contact support. in E:/bee/client/trunk/proj.android/…/…/…/…/hero2//engine/proj.android/…/src/audio/AudioManager.cpp at 563
10-28 13:38:29.508 8760-8804/ D: FMOD Error: (28) An error occurred that wasn’t supposed to. Contact support. in E:/bee/client/trunk/proj.android/…/…/…/…/hero2//engine/proj.android/…/src/audio/AudioManager.cpp at 594
10-28 13:38:29.517 8760-8804/ D/: FMOD Error: (28) An error occurred that wasn’t supposed to. Contact support. in E:/bee/client/trunk/proj.android/…/…/…/…/hero2//engine/proj.android/…/src/audio/AudioManager.cpp at 563
10-28 13:38:29.526 8760-8804/ D/: FMOD Error: (28) An error occurred that wasn’t supposed to. Contact support. in E:/bee/client/trunk/proj.android/…/…/…/…/hero2//engine/proj.android/…/src/audio/AudioManager.cpp at 563
10-28 13:38:29.534 8760-8804/ D/: FMOD Error: (28) An error occurred that wasn’t supposed to. Contact support. in E:/bee/client/trunk/proj.android/…/…/…/…/hero2//engine/proj.android/…/src/audio/AudioManager.cpp at 563
10-28 13:38:29.542 8760-8804/ D/: FMOD Error: (28) An error occurred that wasn’t supposed to. Contact support. in E:/bee/client/trunk/proj.android/…/…/…/…/hero2//engine/proj.android/…/src/audio/AudioManager.cpp at 563
10-28 13:38:29.542 8760-8804/ D/: FMOD Error: (28) An error occurred that wasn’t supposed to. Contact support. in E:/bee/client/trunk/proj.android/…/…/…/…/hero2//engine/proj.android/…/src/audio/AudioManager.cpp at 594
10-28 13:38:29.551 8760-8804/ D/: FMOD Error: (28) An error occurred that wasn’t supposed to. Contact support. in E:/bee/client/trunk/proj.android/…/…/…/…/hero2//engine/proj.android/…/src/audio/AudioManager.cpp at 563
10-28 13:38:29.558 8760-8808/ E/fmod: assert : assertion: ‘mRefCount >= 0’ failed
10-28 13:38:29.558 8760-8808/ E/fmod: AsyncManager::asyncThreadLoop : System::update returned error 28.
please help

Hi mathew,
I forget to tell you, my fmod version is 2.01.01
I get the crash information and error(FMOD):
FMOD Error: (30) An invalid object handle was used (Studio::EventInstance::stop)
FMOD Error: (30) An invalid object handle was used (Studio::EventInstance::release)

A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xb7ed5a40000000a5 in tid 4992 (FMOD Studio upd), pid 4720 (om.komoe.yxxygp)
2020-10-29 11:33:26.795 13921-13921/? E/DEBUG: failed to readlink /proc/4992/fd/105: No such file or directory
2020-10-29 11:33:26.795 13921-13921/? E/DEBUG: failed to readlink /proc/4992/fd/106: No such file or directory
2020-10-29 11:33:27.074 13921-13921/? I/crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
2020-10-29 11:33:27.075 1059-1059/? I//system/bin/tombstoned: received crash request for pid 4992
2020-10-29 11:33:27.079 13921-13921/? I/crash_dump64: performing dump of process 4720 (target tid = 4992)
2020-10-29 11:33:27.114 13921-13921/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2020-10-29 11:33:27.114 13921-13921/? A/DEBUG: Build fingerprint: ‘nubia/NX619J/NX619J:9/PKQ1.180929.001/eng.nubia.20191010.190126:user/release-keys’
2020-10-29 11:33:27.114 13921-13921/? A/DEBUG: Revision: ‘0’
2020-10-29 11:33:27.114 13921-13921/? A/DEBUG: ABI: ‘arm64’
2020-10-29 11:33:27.115 13921-13921/? A/DEBUG: pid: 4720, tid: 4992, name: FMOD Studio upd >>> com.komoe.yxxygp <<<
2020-10-29 11:33:27.115 13921-13921/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xb7ed5a40000000a5
2020-10-29 11:33:27.115 13921-13921/? A/DEBUG: x0 0000006fac2ee088 x1 0000006fc45b2008 x2 0000006fc45b2008 x3 0000006fb399e4dc
2020-10-29 11:33:27.115 13921-13921/? A/DEBUG: x4 00000000815e53ff x5 0000000000000000 x6 0000000000000000 x7 0000000042d70e90
2020-10-29 11:33:27.115 13921-13921/? A/DEBUG: x8 b7ed5a40000000a5 x9 0000000000000000 x10 0000006fa850a780 x11 0000006fc43a4f08
2020-10-29 11:33:27.115 13921-13921/? A/DEBUG: x12 0000006fc43b5ee8 x13 000000007f800000 x14 0000000000000440 x15 00006a77a7e9fc3b
2020-10-29 11:33:27.115 13921-13921/? A/DEBUG: x16 0000006fca5b0590 x17 0000006fca12ffd8 x18 0000000000000000 x19 0000006fac2ee088
2020-10-29 11:33:27.115 13921-13921/? A/DEBUG: x20 0000006fc45b2008 x21 0000006fac2ee0d0 x22 0000006fc7099f10 x23 0000006fb2974438
2020-10-29 11:33:27.115 13921-13921/? A/DEBUG: x24 0000000000000000 x25 0000006fc7079000 x26 0000006fca080588 x27 0000000000000000
2020-10-29 11:33:27.115 13921-13921/? A/DEBUG: x28 0000000000000001 x29 0000006fc7099ed0
2020-10-29 11:33:27.115 13921-13921/? A/DEBUG: sp 0000006fc7099eb0 lr 0000006fca578c48 pc 0000006fca578da8
2020-10-29 11:33:27.115 13921-13921/? A/DEBUG: backtrace:
2020-10-29 11:33:27.115 13921-13921/? A/DEBUG: #00 pc 00000000000e2da8 /data/app/com.komoe.xy==/lib/arm64/libfmodstudio.so

FMOD Error: (46) Operation could not be performed because specified sound/DSP connection is not ready(loadBankMemory)

I hope it helped you,thank you very much!

It’s best to avoid unloading banks from the EventInstance stopped callback, it looks like there is some potential for crash if doing that. Do you still have issue if you don’t do that?

I think I know what caused the crash. I unload the bank,then reload it at once. The state of bank is FMOD_STUDIO_LOADING_STATE_UNLOADING, rather than FMOD_STUDIO_LOADING_STATE_UNLOADED.
it could cause a crash. Let me test it again.
Thank you very much!