FMOD causing crash on Android

Works fine on pc and in editor. But when I deploy to an android device the first time I play a sound the entire game freezes up. If I then reboot the game it all works fine.
Any idea what can be causing this?

I have two ideas.

  1. You’re loading files straight from disk without FMOD Studio and are not using the correct prefix. I can’t remember the exact wording but it’s something like “file:///your_file.ogg”. There should be some docs on it. At the very least, the Unity integration shows this prefix in the RuntimeManager.cs class during LoadBank calls.

  2. The audio is loaded on the main thread and hangs until complete.

But you haven’t given much information, nor explained any debugging you’ve done so I can’t say anything with much certainty.

1 Like

file:///android_asset is the correct prefix

Our game is facing the same problem on Android, the moment the first audio is played, the whole game hangs. Crash at vdso without any further backtrace. It does not always happen, but when it does, it’s almost always the first audio. We use 64-bit IL2CPP.
Update: This seems to be a fix for the problem

So my issue seems to be when I have both FMOD and Unity Ads enabled. If I initiate the Ads there is a chance the game will just freeze up. The solution Ethan linked to doesn’t help as I’m on Android 9.

If I disable the Ads, no crashes, if I disable the sounds, no crashes. Both enabled I get crashes :frowning:
Bit lost what to try next now…

Is it crashing in FMOD? Have you been able to get any logs or crash dumps?

No, there was nothing useful at all in the logcat.
After further investigation though it seems to only happen when I click “Build and run” in unity. If I install the app via apk or google play, or even reopen the app once installed by unity it all works fine. So I’ve given up the hunt for it now.