Fmodstudiocl is barely functional as a command-line tool used in automated builds

FMOD Studio version 2.02.17 (Linux, Windows, macOS)

I believe fmodstudiocl has a serious memory bug and architectural problems. The tool succeeds, but sometimes crashes randomly for no apparent reason, which makes it unsuitable for any automated build system. Sometimes, it even displays FMOD Studio’s crash report dialog box requiring user input and stalling the entire process. For a CLI program, this behavior is absolutely atrocious and potentially kills any scripted use-case.

It’s not the tool’s only problem either. After successfully building the bank files, the program waits for a few seconds for no apparent reason, then always quits with the following message:

[ERR] assert                                   : assertion: 'gSystemInitCount == 0' failed

Killing the tool right when the Build completed successfully. message pops up yields correct bank files (checked with diff). That made me 100% sure the extra wait time is unnecessary and a result of an error, possibly even linked to the crash mentioned above.

Because of that, I decided to run the tool under Valgrind. Unsurprisingly, Valgrind reported segmentation fault where expected, right after the Build completed successfully. message. See the log file attached below:
fmodstudiocl-valgrind.txt (20.7 KB)

This confirms that the tool’s instability is a result of a dire programming error and renders it virtually unusable in any application requiring predictable results.

The most bizarre thing I found, however, is that the executable is also linked to UI libraries (especially Qt). Hence, running it on a minimal GUI-less Linux build server is needlessly difficult. Why is that? Why can’t the tool be a minimal executable focused solely on building the banks? FMOD Studio UI could then also use that tool as well, making the process more predictable, and the core functionality neatly separated from the UI (possibly even distributed separately as a smaller package for build-only oriented setups).

I truly hope the issues above will be fixed soon (the crash issue also happens in version 2.03.07). Meanwhile, is there any alternative way of building the banks predictably in automated build systems?

Sorry to hear you’re having such a bad time with fmodstudiocl, that must be very frustrating. Thanks for the valgrind report - it suggests to me that the crash you’re hitting is an issue that has already been fixed. Would you mind getting the latest 2.02.xx version, which is 2.02.28, and see if you still get that crash please? We guarantee compatibility within major releases so you should be able to drop in 2.02.28 without changing anything in your code.

Indeed, 2.02.28 doesn’t seem to be crashing neither under Valgrind nor when run standalone. There’s still that odd 4-5-second delay before the tool quits with that enigmatic assertion failure message, but it’s surely better than crashing randomly.

However, does that mean that 2.03.07 suffers from a regression? Under Valgrind, the crash happens again, this time consistently with the crash report popup being displayed every time, but now it occurs right after the Loading project message. When standalone, 2.03.07 builds the banks correctly and exits gracefully (except for that delay/assertion thing, which is still there). Reading through the Valgrind log makes me think it’s a new unrelated issue and a potential time bomb:
fmod2.3.valgrind.txt (247.4 KB)

Thanks for pointing me to 2.02.28, it seems to be free of the crash issue which makes that version usable. I’d still look at 2.03.07 and its suspicious behavior under Valgrind, though.