Random Crashes on iOS 15+

I have 10-20 crashes in my app from last 2 weeks only ios 15 or above

I will be glad for any help or information, thanks

attached crash log:

Hardware Model:      iPhone12,1
Process:             %AppName% [6821]
Path:                /private/var/containers/Bundle/Application/460BE69F-AA91-4611-954B-C837622941A2/%AppName%.app/%AppName%
Identifier:          %Identifier%
Version:             2.3.2020 (2020)
AppStoreTools:       13A1030d
AppVariant:          1:iPhone12,1:13
Code Type:           ARM-64 (Native)
Role:                Background
Parent Process:      launchd [1]
Coalition:           %Identifier% [1751]

Date/Time:           2021-10-29 17:51:37.1505 +0300
Launch Time:         2021-10-29 17:37:45.9539 +0300
OS Version:          iPhone OS 15.1 (19B74)
Release Type:        User
Baseband Version:    3.00.00
Report Version:      104

Exception Type:  EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0


Kernel Triage:
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage
VM - Compressor failed a blocking pager_get


Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x00000001b7412ae4 __semwait_signal + 8
1   libsystem_c.dylib             	0x000000018b3f3f00 nanosleep + 216 (nanosleep.c:104)
2   libc++.1.dylib                	0x0000000198cec820 std::__1::this_thread::sleep_for(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > const&) + 84 (__threading_support:546)
3   libAudioToolboxUtility.dylib  	0x00000001995c6d50 caulk::concurrent::guarded_lookup_hash_table<unsigned int, BaseOpaqueObject*, (caulk::concurrent::guarded_lookup_hash_table_options)0>::remove(unsigned int) + 184 (thread:386)
4   libAudioToolboxUtility.dylib  	0x00000001995ca118 BaseOpaqueObject::~BaseOpaqueObject() + 68 (OpaqueObjectMgr.cpp:87)
5   libEmbeddedSystemAUs.dylib    	0x00000001bc1d6a04 AURemoteIO::~AURemoteIO() + 336 (OpaqueObjectMgr.h:181)
6   libEmbeddedSystemAUs.dylib    	0x00000001bc1e0040 ausdk::ComponentBase::AP_Close(void*) + 116 (ComponentBase.cpp:68)
7   AudioToolboxCore              	0x00000001932346cc AudioComponentInstanceDispose + 88 (APComponent.mm:415)
8   UnityFramework                	0x00000001058eda84 FMOD::OutputCoreAudio::reset(bool, bool) + 472
9   Foundation                    	0x0000000181d8eb80 -[__NSObserver _doit:] + 348 (NSNotification.m:327)
10  CoreFoundation                	0x0000000180562ed8 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28 (CFNotificationCenter.c:652)
11  CoreFoundation                	0x00000001805feb8c ___CFXRegistrationPost_block_invoke + 52 (CFNotificationCenter.c:173)
12  CoreFoundation                	0x00000001805d1f44 _CFXRegistrationPost + 456 (CFNotificationCenter.c:199)
13  CoreFoundation                	0x0000000180578d44 _CFXNotificationPost + 716 (CFNotificationCenter.c:1147)
14  Foundation                    	0x0000000181d74628 -[NSNotificationCenter postNotificationName:object:userInfo:] + 96 (NSNotification.m:560)
15  AudioSession                  	0x00000001898f10a0 -[AVAudioSession privateInterruptionWithInfo:] + 2036 (AVAudioSession_iOS.mm:2962)
16  AudioSession                  	0x00000001898f1db8 ___ZN8avfaudio30AVAudioSessionPropertyListenerEPvjjPKv_block_invoke.5 + 56 (AVAudioSession_iOS.mm:416)
17  libdispatch.dylib             	0x0000000180241914 _dispatch_call_block_and_release + 32 (init.c:1517)
18  libdispatch.dylib             	0x0000000180243660 _dispatch_client_callout + 20 (object.m:560)
19  libdispatch.dylib             	0x0000000180251b60 _dispatch_main_queue_callback_4CF + 944 (inline_internal.h:2601)
20  CoreFoundation                	0x0000000180589cd4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1795)
21  CoreFoundation                	0x0000000180543eac __CFRunLoopRun + 2540 (CFRunLoop.c:3144)
22  CoreFoundation                	0x00000001805573b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
23  GraphicsServices              	0x000000019bee738c GSEventRunModal + 164 (GSEvent.c:2200)
24  UIKitCore                     	0x0000000182ef76a8 -[UIApplication _run] + 1100 (UIApplication.m:3493)
25  UIKitCore                     	0x0000000182c767f4 UIApplicationMain + 2092 (UIApplication.m:5046)
26  UnityFramework                	0x0000000104cb3518 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 108 (main.mm:96)
27  %AppName%                    	0x000000010019be00 main + 68 (main.mm:26)
28  dyld                          	0x00000001003e5a24 start + 520 (dyldMain.cpp:876)

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000004   x1: 0x0000000000000000   x2: 0x0000000000000001   x3: 0x0000000000000001
    x4: 0x0000000000000000   x5: 0x000000000007a120   x6: 0x0000000000000000   x7: 0x000000000000003e
    x8: 0x00000001d9ce5c20   x9: 0x0000000000000003  x10: 0x0000000000000011  x11: 0x0000000000000005
   x12: 0x0000000001aa5000  x13: 0x0000000000000000  x14: 0x0000020000011000  x15: 0x02000001100005f8
   x16: 0x000000000000014e  x17: 0xf8810001dcb26ee0  x18: 0x00000001305a687c  x19: 0x000000016fc69a60
   x20: 0x000000016fc69a60  x21: 0x00000002801ec6e0  x22: 0x00000002820ae6a0  x23: 0x000000000007a120
   x24: 0x0000000280685440  x25: 0x0000000282df83c0  x26: 0x0000000000000000  x27: 0x000000e5000000dc
   x28: 0x0000000000001400   fp: 0x000000016fc69a50   lr: 0x000000018b3f3f00
    sp: 0x000000016fc69a20   pc: 0x00000001b7412ae4 cpsr: 0x60000000
   esr: 0x56000080  Address size fault

EOF

Are you using Unity ? Did you ask them about possible cause of crash ?

@Claude31 yes, i created a similar thread on the unity-forum, thanks

Thanks for feedback. Please post answer here when you get it from Unity forum.

I see crashes in __semwait_signal and in __ulock_wait in two different apps, not related to Unity. It started with iOS 15 and is not solved in 15.1. Crashes happen in Google Maps SDK and Airship SDK.

I've an app that hangs sometimes when AudioComponentInstanceDispose is called. The function just doesn't return and the system watchdog eventually shuts my app down. Though the crash reason may be different, that AudioComponentInstanceDispose hang time looks suspiciously similar.
Only happens on iOS 15. Am not using Unity.

A similar report is here: https://github.com/pjsip/pjproject/issues/2896

Looks like it is a general ios 15 problem https://developer.apple.com/forums/thread/693623?page=2

We continue to have problems determine the root cause of Intermittant APP crash. We were told to look at the Third Party SDK that opens and closes the Lidar camera. We have confirmed we are opening and closing the camera properly. We built a test app to open and close the app and it ran 150 times without a problem.

Could a thread that saves the JPG pictures as a video cause the sensor_stream to hang and crash the app? Here is snippets of the crash logs. Any further help would be appreciated.

Crash Log1 Exception Type:  EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000134500000

Thread 46 name: Thread 46 Crashed: 0   libsystem_platform.dylib      0x00000001f110da84 _platform_memmove + 52 1   UnityFramework                0x0000000107c4eb60 Sensor_Stream_mFF850E96E26ADC438DFA62EFFABFDAEDE3B6DEEC + 632 (LightBuzz.BodyTracking.cpp:24277)

Crash Log2 Triggered by Thread:  56.  Kernel Triage: VM - pmap_enter failed with resource shortage

Thread 56 name: Thread 56 Crashed: 0   libsystem_platform.dylib      0x00000001f110da84 _platform_memmove + 52 1   UnityFramework                0x0000000109362b58 Sensor_Stream_mFF850E96E26ADC438DFA62EFFABFDAEDE3B6DEEC + 632 (LightBuzz.BodyTracking.cpp:24277)

Thanks, David

Random Crashes on iOS 15+
 
 
Q