Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Requested X could not be found" with BankLoader. #250

Open
NatePlays95 opened this issue Sep 19, 2024 · 2 comments
Open

"Requested X could not be found" with BankLoader. #250

NatePlays95 opened this issue Sep 19, 2024 · 2 comments

Comments

@NatePlays95
Copy link

I seem to get errors these even when not calling any Fmod functions, just adding one BankLoader in the scene and loading my master.
The project runs without any issues, however; My audio and automation works fine.
image
image

Apparently these errors are caused if I either load my "Master.strings" bank after the "Master" bank, or don't load strings at all. Loading strings before master fixes this, but that wasn't explained anywhere in docs (I understand they're still WIP). I couldn't find anywhere in FMOD docs that order mattered either, or why should I include the strings bank even if I just use IDs. I'm open to be corrected and informed, though.

Also these errors aren't clear at all. It's a bank load failure but as the error mentioned it could be an event load failure I thought it was a problem with my events, which wasn't the case.

Here's the entire error strings I had to copy from godot's "right click error" interaction. Not sure why these don't display fully but that's a godot thing, not a godot-fmod thing.

E 0:00:00:0776   push_error: The requested event, parameter, bus or vca could not be found.class godot::Ref<class godot::FmodBank> __cdecl godot::FmodBank::create_ref(class FMOD::Studio::Bank *)D:\a\fmod-gdextension\fmod-gdextension\src\studio/fmod_bank.h13
  <C++ Source>   core/variant/variant_utility.cpp:1091 @ push_error()

E 0:00:00:0777   push_error: The requested event, parameter, bus or vca could not be found.class godot::Ref<class godot::FmodBus> __cdecl godot::FmodBus::create_ref(class FMOD::Studio::Bus *)D:\a\fmod-gdextension\fmod-gdextension\src\studio\fmod_bus.h9
  <C++ Source>   core/variant/variant_utility.cpp:1091 @ push_error()

E 0:00:00:0777   push_error: The requested event, parameter, bus or vca could not be found.class godot::Ref<class godot::FmodBus> __cdecl godot::FmodBus::create_ref(class FMOD::Studio::Bus *)D:\a\fmod-gdextension\fmod-gdextension\src\studio\fmod_bus.h9
  <C++ Source>   core/variant/variant_utility.cpp:1091 @ push_error()

E 0:00:00:0777   push_error: The requested event, parameter, bus or vca could not be found.class godot::Ref<class godot::FmodEventDescription> __cdecl godot::FmodEventDescription::create_ref(class FMOD::Studio::EventDescription *)D:\a\fmod-gdextension\fmod-gdextension\src\studio\fmod_event_description.h11
  <C++ Source>   core/variant/variant_utility.cpp:1091 @ push_error()
  
  W 0:00:00:0967   FmodManager.gd:9 @ _process(): FMOD Sound System: No listeners are set!void __cdecl godot::FmodServer::_set_listener_attributes(void)src\fmod_server.cpp258
  <C++ Source>   core/variant/variant_utility.cpp:1111 @ push_warning()
  <Stack Trace>  FmodManager.gd:9 @ _process()

I'm running on Windows 11, godot 4.2.2, in debug run (F6).

@CedNaru
Copy link
Member

CedNaru commented Sep 19, 2024

Hello,

it's not the first time we have issues with people being confused regarding the loading of the string bank. That one is our fault and we have to improve the documentation.

Regarding the error message itself, we sadly don't have a way to change it because it is directly emitted by the Fmod library and not our plugin. We simply check if Fmod returned an error and print it to the console if that's the case. It's indeed confusing.
The error seems to be emitted by the following line when we retrieve the list of VCA, Bus and Event in a bank:

ERROR_CHECK(wrapped->getPath(path, MAX_PATH_SIZE, nullptr)); \

I'm not certain, but it appears that the path can only be retrieved if the string bank is loaded.
There are two ways forward. Either we add a boolean in the code that says if the string bank has been loaded and avoid certain operation if not the case, or we make the loading of the string bank mandatory and explicitly throw an error we created ourselves if someone tried to load any other bank before the string one.

It's technically possible for someone to use FMOD without any string/name/path by using only GUID/IDs. I'm not sure if we should support this alternative mode or if the plugin should only allow a string enabled setting.

@NatePlays95
Copy link
Author

I'm not familiar with GdExtension but I think throwing another error with more descriptive information is a safe bet, I've enjoyed that pattern when working with Java libraries for some other non-Godot projects. If I come across this particular message more often I might make a post on the Fmod forums as well so they could tweak it over there.

I also saw the same thing about needing to load strings in the older Fmod integration (now archived) for 4.1. My very naive bet is that selecting a bank from the special interface loads as string regardless of the chosen setting but I'm the newbie here haha. Everything else has been flawless so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants