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”); (MainActivity.java:53)

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

Does this ring any bells?

Thanks

Exception java.lang.ExceptionInInitializerError:
  at java.lang.Class.newInstance
  at android.app.AppComponentFactory.instantiateActivity (AppComponentFactory.java:69)
  at android.app.Instrumentation.newActivity (Instrumentation.java:1216)
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2902)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3119)
  at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:78)
  at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:108)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:68)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1839)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:201)
  at android.app.ActivityThread.main (ActivityThread.java:6861)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:547)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:873)
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 (Runtime.java:999)
  at java.lang.System.loadLibrary (System.java:1669)
  at com.vectorunit.cobalt.googleplay.MainActivity.<clinit> (MainActivity.java:53)

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:

static 
{
	System.loadLibrary("fmod");
	System.loadLibrary("fmodstudio");
}

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?