FMOD Crash on Android on first oneShot, FORTIFY: pthread_mutex_lock called on a destroyed mutex

It seems a bug I was only getting on Unity’s “Build and Run” has now become repeatable every run :frowning:
On the bright side it means I now have some logcat crash info, although no clue what it means, any suggestions? This crash happens the first time I try to play a oneshot. It seems FMod has initialized currectly as the background music is playing.

Blockquote
10-18 21:53:05.755 2589 2975 F libc : FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x747b81be80)
10-18 21:53:05.759 2589 2896 I Unity : ContainerThemeLevels (2) resizeGridObject 1105 217
10-18 21:53:05.759 2589 2896 I Unity : UIGridObject:ResizeObject()
10-18 21:53:05.759 2589 2896 I Unity :
10-18 21:53:05.759 2589 2896 I Unity : (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)
10-18 21:53:05.759 2589 2896 I Unity :
10-18 21:53:05.799 2589 2975 E CRASH : signal 6 (SIGABRT), code -6 (?), fault addr --------
10-18 21:53:05.799 2589 2975 E CRASH : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-18 21:53:05.799 2589 2975 E CRASH : Build type ‘Release’, Scripting Backend ‘il2cpp’, CPU ‘arm64-v8a’
10-18 21:53:05.799 2589 2975 E CRASH : Build fingerprint: ‘OnePlus/OnePlus3/OnePlus3T:9/PKQ1.181203.001/1907311932:user/release-keys’
10-18 21:53:05.799 2589 2975 E CRASH : Revision: ‘0’
10-18 21:53:05.799 2589 2975 E CRASH : pid: 2589, tid: 2975, name: FMOD Studio sam >>> com.aniode.gnarbiketrials2 <<<
10-18 21:53:05.799 2589 2975 E CRASH : x0 0000000000000000 x1 0000000000000b9f x2 0000000000000006 x3 0000000000000008
10-18 21:53:05.799 2589 2975 E CRASH : x4 0000000000008080 x5 0000000000008080 x6 0000000000008080 x7 0000000000000038
10-18 21:53:05.799 2589 2975 E CRASH : x8 0000000000000083 x9 5512dfc16e851a39 x10 fffffff87ffffbdf x11 5512dfc16e851a39
10-18 21:53:05.799 2589 2975 E CRASH : x12 5512dfc16e851a39 x13 fffffff87ffffbdf x14 000000005daa2631 x15 0000000000000008
10-18 21:53:05.799 2589 2975 E CRASH : x16 000000750c29f2b0 x17 000000750c1b1088 x18 5512dfc16e851a39 x19 0000000000000a1d
10-18 21:53:05.800 2589 2975 E CRASH : x20 0000000000000b9f x21 0000000000000083 x22 0000000000000000 x23 000000745cf61de0
10-18 21:53:05.800 2589 2975 E CRASH : x24 000000745cc51570 x25 0000007461d6e908 x26 000000745cc51588 x27 000000746b9e9588
10-18 21:53:05.800 2589 2975 E CRASH : x28 0000000000000000 x29 000000745cc50f10 x30 000000750c1a24d0
10-18 21:53:05.800 2589 2975 E CRASH : sp 000000745cc50ed0 pc 000000750c1a24f0 pstate 0000000060000000
10-18 21:53:05.800 2589 2975 E CRASH :
10-18 21:53:05.800 2589 2975 E CRASH : backtrace:
10-18 21:53:05.828 2589 2975 E CRASH : #00 pc 000000000000068c [vdso] ()
10-18 21:53:05.828 2589 2975 E CRASH : #01 pc 00000000000224ec /system/lib64/libc.so (abort+108)
10-18 21:53:05.828 2589 2975 E CRASH : #02 pc 000000000009b308 /system/lib64/libc.so (_ZL15__fortify_fatalPKcz+128)
10-18 21:53:05.828 2589 2975 E CRASH : #03 pc 000000000009a908 /system/lib64/libc.so (_ZL25HandleUsingDestroyedMutexP15pthread_mutex_tPKc+52)
10-18 21:53:05.828 2589 2975 E CRASH : #04 pc 000000000009a784 /system/lib64/libc.so (pthread_mutex_lock+228)
10-18 21:53:05.828 2589 2975 E CRASH : #05 pc 00000000000a4de0 /system/lib64/libc++.so (_ZNSt3__15mutex4lockEv+8)
10-18 21:53:05.828 2589 2975 E CRASH : #06 pc 000000000000da7c /system/lib64/libandroid.so (AAssetManager_open+64)
10-18 21:53:05.828 2589 2975 E CRASH : #07 pc 00000000000c726c /data/app/com.aniode.gnarbiketrials2-ogYNvTqyPju-08eWN6cxZA==/lib/arm64/libfmod.so ()
10-18 21:53:05.893 2589 2896 E CRASH : other thread is trapped; signum = 6
10-18 21:53:05.894 2589 2896 E MessageQueue: IdleHandler threw exception
10-18 21:53:05.894 2589 2896 E MessageQueue: java.lang.Error: signal 6 (SIGABRT), code -6 (?), fault addr --------
10-18 21:53:05.894 2589 2896 E MessageQueue: Build fingerprint: ‘OnePlus/OnePlus3/OnePlus3T:9/PKQ1.181203.001/1907311932:user/release-keys’
10-18 21:53:05.894 2589 2896 E MessageQueue: Revision: ‘0’
10-18 21:53:05.894 2589 2896 E MessageQueue: pid: 2589, tid: 2975, name: FMOD Studio sam >>> com.aniode.gnarbiketrials2 <<<
10-18 21:53:05.894 2589 2896 E MessageQueue: x0 0000000000000000 x1 0000000000000b9f x2 0000000000000006 x3 0000000000000008
10-18 21:53:05.894 2589 2896 E MessageQueue: x4 0000000000008080 x5 0000000000008080 x6 0000000000008080 x7 0000000000000038
10-18 21:53:05.894 2589 2896 E MessageQueue: x8 0000000000000083 x9 5512dfc16e851a39 x10 fffffff87ffffbdf x11 5512dfc16e851a39
10-18 21:53:05.894 2589 2896 E MessageQueue: x12 5512dfc16e851a39 x13 fffffff87ffffbdf x14 000000005daa2631 x15 0000000000000008
10-18 21:53:05.894 2589 2896 E MessageQueue: x16 000000750c29f2b0 x17 000000750c1b1088 x18 5512dfc16e851a39 x19 0000000000000a1d
10-18 21:53:05.894 2589 2896 E MessageQueue: x20 0000000000000b9f x21 0000000000000083 x22 0000000000000000 x23 000000745cf61de0
10-18 21:53:05.894 2589 2896 E MessageQueue: x24 000000745cc51570 x25 0000007461d6e908 x26 000000745cc51588 x27 000000746b9e9588
10-18 21:53:05.894 2589 2896 E MessageQueue: x28 0000000000000000 x29 000000745cc50f10 x30 000000750c1a24d0
10-18 21:53:05.894 2589 2896 E MessageQueue: sp 000000745cc50ed0 pc 000000750c1a24f0 pstate 0000000060000000
10-18 21:53:05.894 2589 2896 E MessageQueue:
10-18 21:53:05.894 2589 2896 E MessageQueue: at [vdso].(:0)
10-18 21:53:05.894 2589 2896 E MessageQueue: at libc.abort(abort:108)
10-18 21:53:05.894 2589 2896 E MessageQueue: at libc._ZL15__fortify_fatalPKcz(_ZL15__fortify_fatalPKcz:128)
10-18 21:53:05.894 2589 2896 E MessageQueue: at libc._ZL25HandleUsingDestroyedMutexP15pthread_mutex_tPKc(_ZL25HandleUsingDestroyedMutexP15pthread_mutex_tPKc:52)
10-18 21:53:05.894 2589 2896 E MessageQueue: at libc.pthread_mutex_lock(pthread_mutex_lock:228)
10-18 21:53:05.894 2589 2896 E MessageQueue: at libc++._ZNSt3__15mutex4lockEv(_ZNSt3__15mutex4lockEv:8)
10-18 21:53:05.894 2589 2896 E MessageQueue: at libandroid.AAssetManager_open(AAssetManager_open:64)
10-18 21:53:05.894 2589 2896 E MessageQueue: at libfmod.(:0)
10-18 21:53:08.578 18253 18276 D NetworkStateUtils: netWorkState=1
10-18 21:53:09.658 543 759 E qti_sensors_hal: processInd: pickup data: state: 1.000000 flag: 0.000000 SAM TS: 4250514994 HAL TS:129711414044421 elapsedRealtimeNano:129711436045440
10-18 21:53:09.697 2589 2589 E CRASH : other thread is trapped; signum = 6
10-18 21:53:09.698 2589 2589 E CRASH : main thread is trapped; signum = 6
10-18 21:53:09.698 2589 2589 E CRASH : other thread is trapped; signum = 6
10-18 21:53:09.726 2589 2589 E CRASH : main thread is trapped; signum = 6
10-18 21:53:09.727 2589 2589 E CRASH : other thread is trapped; signum = 6
10-18 21:53:09.743 2589 2589 E CRASH : main thread is trapped; signum = 6
10-18 21:53:09.743 2589 2589 E CRASH : other thread is trapped; signum = 6
10-18 21:53:09.760 2589 2589 E CRASH : main thread is trapped; signum = 6
10-18 21:53:09.760 2589 2589 E CRASH : other thread is trapped; signum = 6
10-18 21:53:09.776 2589 2589 E CRASH : main thread is trapped; signum = 6
10-18 21:53:09.776 2589 2589 E CRASH : other thread is trapped; signum = 6
10-18 21:53:09.793 2589 2589 E CRASH : main thread is trapped; signum = 6
10-18 21:53:09.793 2589 2589 E CRASH : other thread is trapped; signum = 6
10-18 21:53:09.810 2589 2589 E CRASH : main thread is trapped; signum = 6
10-18 21:53:09.810 2589 2589 E CRASH : other thread is trapped; signum = 6
10-18 21:53:09.827 2589 2589 E CRASH : main thread is trapped; signum = 6
10-18 21:53:09.827 2589 2589 E CRASH : other thread is trapped; signum = 6
10-18 21:53:09.844 2589 2589 E CRASH : main thread is trapped; signum = 6
10-18 21:53:09.844 2589 2589 E CRASH : other thread is trapped; signum = 6
10-18 21:53:09.860 2589 2589 E CRASH : main thread is trapped; signum = 6
10-18 21:53:09.861 2589 2589 E CRASH : other thread is trapped; signum = 6
10-18 21:53:09.877 2589 2589 E CRASH : main thread is trapped; signum = 6
10-18 21:53:09.877 2589 2589 E CRASH : other thread is trapped; signum = 6
10-18 21:53:09.894 2589 2589 E CRASH : main thread is trapped; signum = 6
10-18 21:53:09.894 2589 2589 E CRASH : other thread is trapped; signum = 6
10-18 21:53:09.910 2589 2589 E CRASH : main thread is trapped; signum = 6
10-18 21:53:09.910 2589 2589 E CRASH : other thread is trapped; signum = 6
10-18 21:53:09.925 2589 2589 E CRASH : main thread is trapped; signum = 6
10-18 21:53:09.925 2589 2589 E CRASH : other thread is trapped; signum = 6
10-18 21:53:09.925 2589 2589 E CRASH : main thread is trapped; signum = 6
10-18 21:53:09.925 2589 2589 E CRASH : other thread is trapped; signum = 6
10-18 21:53:10.086 1391 1683 D AutomaticBrightnessController: setAmbientLux(13.0)
10-18 21:53:11.428 2045 2045 D KeyguardIndication: onRefreshBatteryInfo: plugged:false, wasPluggedIn: false, charged:false, level:91, speed:-1, last speed:-1, visible:false
10-18 21:53:11.429 18253 18253 D WidgetViewService: ------BatteryReceiver------power=91
10-18 21:53:11.475 1391 1497 I ActivityManager: Start proc 3189:com.google.android.apps.turbo/u0a224 for broadcast com.google.android.apps.turbo/.nudges.broadcasts.BatteryStatusChangedReceiver
10-18 21:53:11.483 3189 3189 I roid.apps.turb: Late-enabling -Xcheck:jni
10-18 21:53:11.487 3189 3189 E roid.apps.turb: Not starting debugger since process cannot load the jdwp agent.
10-18 21:53:11.518 1391 3188 I ActivityManager: pid= 585 st.name = surfaceflinger cpuPercent = 20 st.rel_utime =7630 st.rel_stime =7780

On further troubleshooting it seems to be caused by the Unity Ads initialising. Initialising the Ads in a “SplashScreen” scene before loading the main game seems to have fixed the crash again for now. Hopefully it won’t come back to haunt me again…

Ok it’s come back to haunt me. Seems to be crashing on a lot of Huawei devices :frowning:
Any ideas anyone?

Do you have any logs from the crashes?
What versions of FMOD and Unity are you using?

I do have some logcat logs, but nothing else. I wasn’t on the latest plugin, and have now updated and that has fixed the majority of the issues! So that’s great!
I am still getting the occasional crash on Hauwei devices though any Ideas on how to stop them?

here’s the crash dump from google play:
java.lang.Error: signal 6 (SIGABRT), code -6 (?), fault addr --------
Build fingerprint: ‘HUAWEI/CLT-L09/HWCLT:9/HUAWEICLT-L09/9.1.0.318C782:user/release-keys’
Revision: ‘0’
pid: 8194, tid: 8594, name: FMOD Studio sam >>> com.aniode.gnarbiketrials2 <<<
x0 0000000000000000 x1 0000000000002192 x2 0000000000000006 x3 0000000000000008
x4 0000000000008080 x5 0000000000008080 x6 0000000000008080 x7 0000000000000038
x8 0000000000000083 x9 5af77859fd0d3001 x10 0000000000000000 x11 fffffffc7ffffbdf
x12 0000000000000001 x13 000000005ddc5739 x14 000b263969ed74b6 x15 00000ea9a97ff664
x16 00000075d252f2c0 x17 00000075d246de34 x18 0000007501f2e720 x19 0000000000002002
x20 0000000000002192 x21 00000074fa91939e x22 0000000000000000 x23 00000074cb554dd0
x24 000000753dbca570 x25 000000753dba9000 x26 000000753dbca588 x27 0000000000000000
x28 0000000000000001 x29 000000753dbc9f10 x30 00000075d2462960
sp 000000753dbc9ed0 pc 00000075d2462988 pstate 0000000060000000
at [vdso].(
at libc.abort (abort:112)
at libc._ZL15__fortify_fatalPKcz (_ZL15__fortify_fatalPKcz:120)
at libc._ZL25HandleUsingDestroyedMutexP15pthread_mutex_tPKc (_ZL25HandleUsingDestroyedMutexP15pthread_mutex_tPKc:52)
at libc.pthread_mutex_lock (pthread_mutex_lock:228)
at libc++._ZNSt3__15mutex4lockEv (_ZNSt3__15mutex4lockEv:8)
at libandroid.AAssetManager_open (AAssetManager_open:64)
at split_config. (0)

Is there anything from the logcat that is FMOD related?

Hello,

We seem to have this exactly same issue happening with the project i´m working with. @Bug5532 how did you manage to fix this issue and did you find what was causing it?

This issue seems to be only on 64 bit version and mostly on Android 9 and 10.

Have been hunting issue forever and would be lovely to finally smash this crash bug out from the project.

This appears to be the same issue as this: Android crash with FMOD 2.0.0.7

There is hope of a fix in 2.00.09 which we are waiting for impatiently. This is currently the biggest source of crashes in our games.

Thank you @Adam_Gejdos for the link for that thread, hopefully we can find fix for. Sadly we are running 1.10.02 so the update might be painful but hopefully not.

Hi, sorry I can’t remember exactly what fixed it in the end. I think it was updating FMOD. But I’m not 100% I changed so many things!

Hi, will try the update as they mentioned that the newest version available would have possible fix for the issue. Thanks for the reply.