# Android crash with FMOD 2.0.0.7

**URL:** https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570
**Category:** FMOD Engine
**Created:** [March 25, 2020, 3:26am UTC](https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570 "2020-03-25T03:26:27Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![luzay341](https://avatars.discourse-cdn.com/v4/letter/l/34f0e0/32.png) [@luzay341](https://qa.fmod.com/u/luzay341)
#### Post date: [March 25, 2020, 3:26am UTC](https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570/1 "2020-03-25T03:26:27Z")

</div>

#7337 FMOD Studio sample load thread

SIGABRT

解析原始

1 #00 pc 0001d02e /system/lib/libc.so (abort+57) [armeabi-v8]  
2 #01 pc 00074f53 /system/lib/libc.so (\_\_fortify\_fatal(char const\*, …)+26) [armeabi-v8]  
3 #02 pc 000746e1 /system/lib/libc.so (HandleUsingDestroyedMutex(pthread\_mutex\_t\*, char const\*)+20) [armeabi-v8]  
4 #03 pc 000745fb /system/lib/libc.so (pthread\_mutex\_lock+218) [armeabi-v8]  
5 #04 pc 0007d73f /system/lib/libc++.so (std::\_\_1::mutex::lock()+2) [armeabi-v8]  
6 #05 pc 0000b6ad /system/lib/libandroid.so (AAssetManager\_open+36) [armeabi-v8]  
7 #06 pc 0009d7c7 /data/app/com.xxxxx.xxxx-OKRBsnJLXmPeKd63U6TkIg==/lib/arm/libfmod.so [armeabi-v7a]

---

<div class="post-metadata">

### Author: ![luzay341](https://avatars.discourse-cdn.com/v4/letter/l/34f0e0/32.png) [@luzay341](https://qa.fmod.com/u/luzay341)
#### Post date: [March 25, 2020, 3:29am UTC](https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570/2 "2020-03-25T03:29:38Z")

</div>

1. Someone know the reason？
2. Where to download the symbols file?

Thanks!

---

<div class="post-metadata">

### Author: ![luzay341](https://avatars.discourse-cdn.com/v4/letter/l/34f0e0/32.png) [@luzay341](https://qa.fmod.com/u/luzay341)
#### Post date: [March 25, 2020, 3:31am UTC](https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570/3 "2020-03-25T03:31:19Z")

</div>

PS:The crash is happened in Android system 9 &10 .

---

<div class="post-metadata">

### Author: ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)
#### Post date: [March 31, 2020, 5:09am UTC](https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570/4 "2020-03-31T05:09:51Z")

</div>

If you can reproduce the crash while using the FMOD logging libs, that should provide some useful information.

---

<div class="post-metadata">

### Author: ![luzay341](https://avatars.discourse-cdn.com/v4/letter/l/34f0e0/32.png) [@luzay341](https://qa.fmod.com/u/luzay341)
#### Post date: [March 31, 2020, 7:01am UTC](https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570/5 "2020-03-31T07:01:25Z")

</div>

sorry, we can’t repreduce the crash. do you know the function of "0009d7c7 /data/app/com.xxxxx.xxxx-OKRBsnJLXmPeKd63U6TkIg==/lib/arm/libfmod.so "? may be it can help.

---

<div class="post-metadata">

### Author: ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)
#### Post date: [April 1, 2020, 1:45am UTC](https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570/6 "2020-04-01T01:45:14Z")

</div>

I’ve been looking into your crash call stack, I can see it’s coming from our File I/O routines that deal with opening Android assets packaged into the APK. I can see a potential issue internally however I am unable to reproduce the problem here.

Can you verify that you call `org.fmod.FMOD.init(this)` in your activity `onCreate` for the activity and `org.fmod.FMOD.close()` in the `onDestroy`? As per the documentation [here](https://www.fmod.com/resources/documentation-api?version=2.1&page=platforms-android.html#java).

When you call into our init function we cache the Activity context and use it to access the asset manager from our native code. Our examples follow the pattern of initializing the FMOD Java then creating the native FMOD System, mirrored with shutting down the native FMOD System and closing the FMOD Java. Can you check that your application follows that pattern?

---

<div class="post-metadata">

### Author: ![luzay341](https://avatars.discourse-cdn.com/v4/letter/l/34f0e0/32.png) [@luzay341](https://qa.fmod.com/u/luzay341)
#### Post date: [April 1, 2020, 3:39am UTC](https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570/7 "2020-04-01T03:39:56Z")

</div>

we use Unity Integration to access FMOD.  
we find the code we init FMOD, can’t find close in Unity Integation.  
The code is here.

```
static RuntimeManager Instance
        {
            get
            {
                if (initException != null)
                {
                    throw initException;
                }

                if (instance == null)
                {
                    FMOD.RESULT initResult = FMOD.RESULT.OK; // Initialize can return an error code if it falls back to NO_SOUND, throw it as a non-cached exception

                    var existing = FindObjectsOfType(typeof(RuntimeManager)) as RuntimeManager[];
                    foreach (var iter in existing)
                    {
                        if (existing != null)
                        {
                            // Older versions of the integration may have leaked the runtime manager game object into the scene,
                            // which was then serialized. It won't have valid pointers so don't use it.
                            if (iter.cachedPointers[0] != 0)
                            {
                                instance = iter;
                                instance.studioSystem.handle = ((IntPtr)instance.cachedPointers[0]);
                                instance.coreSystem.handle = ((IntPtr)instance.cachedPointers[1]);
                            }
                            DestroyImmediate(iter);
                        }
                    }

                    var gameObject = new GameObject("FMOD.UnityIntegration.RuntimeManager");
                    instance = gameObject.AddComponent<RuntimeManager>();

                    if (Application.isPlaying) // This class is used in edit mode by the Timeline auditioning system
                    {
                        DontDestroyOnLoad(gameObject);
                    }
                    gameObject.hideFlags = HideFlags.HideAndDontSave;

                    try
                    {
#if UNITY_ANDROID && !UNITY_EDITOR
                        // First, obtain the current activity context
                        AndroidJavaObject activity = null;
                        using (var activityClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
                        {
                            activity = activityClass.GetStatic<AndroidJavaObject>("currentActivity");
                        }

                        using (var fmodJava = new AndroidJavaClass("org.fmod.FMOD"))
                        {
                            if (fmodJava != null)
                            {
                                fmodJava.CallStatic("init", activity);
                            }
                            else
                            {
                                UnityEngine.Debug.LogWarning("[FMOD] Cannot initialize Java wrapper");
                            }
                        }
#endif

                        RuntimeUtils.EnforceLibraryOrder();
                        initResult = instance.Initialize();
                    }
                    catch (Exception e)
                    {
                        initException = e as SystemNotInitializedException;
                        if (initException == null)
                        {
                            initException = new SystemNotInitializedException(e);
                        }
                        throw initException;
                    }

                    if (initResult != FMOD.RESULT.OK)
                    {
                        throw new SystemNotInitializedException(initResult, "Output forced to NO SOUND mode");
                    }
                }
                return instance;
            }
        }

    void OnDestroy()
    {
        if (studioSystem.isValid())
        {
            studioSystem.release();
            studioSystem.clearHandle();
        }
        initException = null;
        instance = null;
    }
```

---

<div class="post-metadata">

### Author: ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)
#### Post date: [April 1, 2020, 4:14am UTC](https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570/8 "2020-04-01T04:14:17Z")

</div>

Thank you for the information.

I have a fix in mind that I will put in 2.00.09, please retest when that becomes available.

---

<div class="post-metadata">

### Author: ![Adam\_Gejdos](https://avatars.discourse-cdn.com/v4/letter/a/0ea827/32.png) [@Adam\_Gejdos](https://qa.fmod.com/u/Adam_Gejdos)
#### Post date: [May 6, 2020, 10:20pm UTC](https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570/9 "2020-05-06T22:20:44Z")

</div>

We have similar crashes occurring in our Unity game using FMOD 2.00.08 – the offset into libfmod.so with version .08 is different but maybe this can correlate with the previous report using .07

We have not reproduced locally but it occurs with some frequency in the real world, with similar reports collected via Google Play, Unity Cloud, and Bugsnag.

It is sometimes corresponding with ad-viewing, although I am not able to say that with certainty. Many breadcrumb report state that an ad was viewed near the time of the crash. We use Unity Ads and IronSource if that matters. Unfortunately I don’t have any more information at this time.

Can you provide an ETA for 2.00.09? We could probably have that integrated and out in the world to many users very quickly.

Here is an example:

```
SIGABRT Abort program 
    /system/lib64/libc.so:139008 abort
    /system/lib64/libc.so:546596 pthread_once
    /system/lib64/libc.so:544368 0x7546606e70
    /system/lib64/libc.so:544000 pthread_mutex_lock
    /system/lib64/libc++.so:629704 _ZNSt3__15mutex4lockEv
    /system/lib64/libandroid.so:56488 AAssetManager_open
    /data/app/com.offfgames.android.free.baseballbattle-DgshmntJJnRsaPR2qIwIGg==/lib/arm64/libfmod.so:814448 0x747f55ed70

```

Thanks!

---

<div class="post-metadata">

### Author: ![luzay341](https://avatars.discourse-cdn.com/v4/letter/l/34f0e0/32.png) [@luzay341](https://qa.fmod.com/u/luzay341)
#### Post date: [May 8, 2020, 2:29am UTC](https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570/10 "2020-05-08T02:29:49Z")

</div>

May I ask when the 2.00.09 is expected to come out？

---

<div class="post-metadata">

### Author: ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)
#### Post date: [May 8, 2020, 2:32am UTC](https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570/11 "2020-05-08T02:32:01Z")

</div>

We are aiming for 2.00.09 to be released early next week, please report back how it goes once integrated into your applications.

---

<div class="post-metadata">

### Author: ![luzay341](https://avatars.discourse-cdn.com/v4/letter/l/34f0e0/32.png) [@luzay341](https://qa.fmod.com/u/luzay341)
#### Post date: [May 8, 2020, 2:43am UTC](https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570/12 "2020-05-08T02:43:30Z")

</div>

Okay, we’ll integrate it first.

---

<div class="post-metadata">

### Author: ![Adam\_Gejdos](https://avatars.discourse-cdn.com/v4/letter/a/0ea827/32.png) [@Adam\_Gejdos](https://qa.fmod.com/u/Adam_Gejdos)
#### Post date: [May 12, 2020, 2:37pm UTC](https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570/13 "2020-05-12T14:37:47Z")

</div>

Really hoping this is fixed in 2.00.09. We have found a case that repros 100% locally and have managed to capture a log with Logging library. There was no relevant output in logcat but this is possibly a more description stack trace. Captured with FMOD 2.00.08 Unity integration:

```
05-07 14:31:40.374 7596 7812 E CRASH : signal 6 (SIGABRT), code -6 (?), fault addr --------
05-07 14:31:40.374 7596 7812 E CRASH : ******  ******  ******  ******  ******  ******  ******  ******
05-07 14:31:40.374 7596 7812 E CRASH : Build type 'Development', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
05-07 14:31:40.374 7596 7812 E CRASH : Build fingerprint: 'samsung/jackpotltevl/jackpotltecan:9/PPR1.180610.011/A530WVLUACTB2:user/release-keys'
05-07 14:31:40.374 7596 7812 E CRASH : Revision: '7'
05-07 14:31:40.374 7596 7812 E CRASH : pid: 7596, tid: 7812, name: FMOD Studio sam >>> com.hotheadgames.android.free.hydrostone <<<
05-07 14:31:40.374 7596 7812 E CRASH : x0 0000000000000000 x1 0000000000001e84 x2 0000000000000006 x3 0000000000000008
05-07 14:31:40.374 7596 7812 E CRASH : x4 0000000000008080 x5 0000000000008080 x6 0000000000008080 x7 0000000000000038
05-07 14:31:40.374 7596 7812 E CRASH : x8 0000000000000083 x9 fef1652add54f8d9 x10 0000000000000000 x11 fffffffc7ffffbdf
05-07 14:31:40.374 7596 7812 E CRASH : x12 0000000000000001 x13 000000005eb47e3a x14 00353a14b95fd880 x15 00005726189c7e20
05-07 14:31:40.374 7596 7812 E CRASH : x16 0000006fbbdb32a0 x17 0000006fbbcf26c8 x18 0000000000000001 x19 0000000000001dac
05-07 14:31:40.374 7596 7812 E CRASH : x20 0000000000001e84 x21 0000006f20febe9e x22 0000006f09fec870 x23 0000000000000000
05-07 14:31:40.374 7596 7812 E CRASH : x24 0000000000000000 x25 0000006f06b56fc4 x26 0000006f13243588 x27 0000006f0d934c28
05-07 14:31:40.374 7596 7812 E CRASH : x28 0000000000000002 x29 0000006f13242e30 x30 0000006fbbce5ecc
05-07 14:31:40.374 7596 7812 E CRASH : sp 0000006f13242df0 pc 0000006fbbce5ef4 pstate 0000000060000000
05-07 14:31:40.374 7596 7812 E CRASH : 
05-07 14:31:40.374 7596 7812 E CRASH : backtrace:
05-07 14:31:40.389 3603 3755 D InputReader: Input event(1): value=0 when=137046.465429
05-07 14:31:40.390 3603 3755 D InputReader: Input event(1): value=0 when=137046.465429
05-07 14:31:40.390 3603 3755 I InputReader: Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] when=137046.465429
05-07 14:31:40.421 7596 7812 E CRASH : #00 pc 000000000000068c [vdso] ()
05-07 14:31:40.421 7596 7812 E CRASH : #01 pc 0000000000021ef0 /system/lib64/libc.so (abort+112)
05-07 14:31:40.421 7596 7812 E CRASH : #02 pc 0000000000084cd4 /system/lib64/libc.so (_ZL15__fortify_fatalPKcz+120)
05-07 14:31:40.421 7596 7812 E CRASH : #03 pc 0000000000084390 /system/lib64/libc.so (_ZL25HandleUsingDestroyedMutexP15pthread_mutex_tPKc+52)
05-07 14:31:40.421 7596 7812 E CRASH : #04 pc 0000000000084240 /system/lib64/libc.so (pthread_mutex_lock+256)
05-07 14:31:40.421 7596 7812 E CRASH : #05 pc 0000000000099cb8 /system/lib64/libc++.so (_ZNSt3__15mutex4lockEv+8)
05-07 14:31:40.421 7596 7812 E CRASH : #06 pc 000000000000dca4 /system/lib64/libandroid.so (AAssetManager_open+64)
05-07 14:31:40.421 7596 7812 E CRASH : #07 pc 00000000000df1e0 /data/app/com.hotheadgames.android.free.hydrostone-E8WyZ8ZuF6eF0muGP5rNbg==/lib/arm64/libfmodL.so ()
05-07 14:31:40.421 7596 7812 E CRASH : #08 pc 00000000001777a8 /data/app/com.hotheadgames.android.free.hydrostone-E8WyZ8ZuF6eF0muGP5rNbg==/lib/arm64/libfmodstudioL.so ()
05-07 14:31:40.421 7596 7812 E CRASH : #09 pc 0000000000020294 /data/app/com.hotheadgames.android.free.hydrostone-E8WyZ8ZuF6eF0muGP5rNbg==/lib/arm64/libfmodstudioL.so ()
05-07 14:31:40.421 7596 7812 E CRASH : #10 pc 0000000000170448 /data/app/com.hotheadgames.android.free.hydrostone-E8WyZ8ZuF6eF0muGP5rNbg==/lib/arm64/libfmodstudioL.so ()
05-07 14:31:40.421 7596 7812 E CRASH : #11 pc 000000000016f7b0 /data/app/com.hotheadgames.android.free.hydrostone-E8WyZ8ZuF6eF0muGP5rNbg==/lib/arm64/libfmodstudioL.so ()
05-07 14:31:40.421 7596 7812 E CRASH : #12 pc 0000000000170330 /data/app/com.hotheadgames.android.free.hydrostone-E8WyZ8ZuF6eF0muGP5rNbg==/lib/arm64/libfmodstudioL.so ()
05-07 14:31:40.421 7596 7812 E CRASH : #13 pc 000000000016ed6c /data/app/com.hotheadgames.android.free.hydrostone-E8WyZ8ZuF6eF0muGP5rNbg==/lib/arm64/libfmodstudioL.so ()
05-07 14:31:40.421 7596 7812 E CRASH : #14 pc 0000000000179c34 /data/app/com.hotheadgames.android.free.hydrostone-E8WyZ8ZuF6eF0muGP5rNbg==/lib/arm64/libfmodstudioL.so ()
05-07 14:31:40.421 7596 7812 E CRASH : #15 pc 000000000017a8c0 /data/app/com.hotheadgames.android.free.hydrostone-E8WyZ8ZuF6eF0muGP5rNbg==/lib/arm64/libfmodstudioL.so ()
05-07 14:31:40.421 7596 7812 E CRASH : #16 pc 0000000000083650 /system/lib64/libc.so (_ZL15__pthread_startPv+196)
05-07 14:31:40.421 7596 7812 E CRASH : #17 pc 0000000000023b34 /system/lib64/libc.so (__start_thread+68)

```

I do see this near the crash:

```
05-07 14:31:38.931 7596 8195 F libc : FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x6f3308ef40)
```

---

<div class="post-metadata">

### Author: ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)
#### Post date: [May 13, 2020, 2:27am UTC](https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570/14 "2020-05-13T02:27:35Z")

</div>

I’m glad you have a 100% repro, please test with 2.00.09 (available now).  
If you are still having issues I can work with you to get it resolved.

---

<div class="post-metadata">

### Author: ![scourger](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@scourger](https://qa.fmod.com/u/scourger)
#### Post date: [May 13, 2020, 9:19am UTC](https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570/15 "2020-05-13T09:19:50Z")

</div>

We have this same crash issue with Fmod 1.10.02 on Android 9 and 10 so really looking for if the 2.00.09 fixes the problem. Please if possible, keep posting your findings to this thread to keep us all with the same problem informed for possible fixes. Thank you all.

---

<div class="post-metadata">

### Author: ![luzay341](https://avatars.discourse-cdn.com/v4/letter/l/34f0e0/32.png) [@luzay341](https://qa.fmod.com/u/luzay341)
#### Post date: [June 8, 2020, 7:26am UTC](https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570/16 "2020-06-08T07:26:59Z")

</div>

This problem seems to have been solved. I haven’t seen the crash for a few days.  
Thanks! @mathew

---

<div class="post-metadata">

### Author: ![scourger](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@scourger](https://qa.fmod.com/u/scourger)
#### Post date: [June 8, 2020, 8:57am UTC](https://qa.fmod.com/t/android-crash-with-fmod-2-0-0-7/15570/17 "2020-06-08T08:57:08Z")

</div>

Can confirm that the issue have been solved by the update, our project just developed other issue from the update but that´s different story and can be followed in here: [Crash on FMOD Studio Update thread, Fmod Version: 2.00.09](https://qa.fmod.com/t/crash-on-fmod-studio-update-thread-fmod-version-2-00-09/15832/9)
