Seeing a new Android crash when calling System.loadLibrary("fmodstudio")

Hi, we’re seeing a new Android crash after (1) switching from NDK r22b to r23b, and (2) integrating firebase crashlytics.

This is being reported on SDK 27-31, but it’s too early to get a device breakdown.

The stack trace is below, and is triggered by calling

System.loadLibrary(“fmodstudio”); (

It’s currently the most prominent crash in our latest update, but still somewhat rare, and not reproducible locally.

Does this ring any bells?


Exception java.lang.ExceptionInInitializerError:
  at java.lang.Class.newInstance
  at (
  at (
  at (
  at (
  at (
  at (
  at (
  at$H.handleMessage (
  at android.os.Handler.dispatchMessage (
  at android.os.Looper.loop (
  at (
  at java.lang.reflect.Method.invoke
  at$ (
  at (
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.indexOf(int)' on a null object reference
  at java.lang.Runtime.loadLibrary0 (
  at java.lang.System.loadLibrary (
  at com.vectorunit.cobalt.googleplay.MainActivity.<clinit> (

java.lang.UnsatisfiedLinkError is a case we have seen before for missing libs but not java.lang.NullPointerException. According to the docs on System.loadLibrary / Runtime.loadLibrary that exception is thrown when the libname argument is null, but you are passing it a hardcoded string so I don’t see how that could be the case.
Are you calling System.loadLibrary from a static initializer or somewhere else?

Static… here’s the code in my activity:


Yep, those values aren’t null. I think wait until you can get a device breakdown and then try reproing it. This isn’t something we’ve seen before and there’s nothing really for us to go off in that stack trace. What version of FMOD are you using?