Xamarin.Forms iOS 15 causing App to Freeze/Crash

After the release of iOS 15 we have been seeing an issue of freezing and then an app crash for our application and it seems to be a native library that we cannot debug. All of our Nugets are up-to-date including running on the latest Xamarin.Forms of 5.0.0.2196. We have tried build the app through App Center with its latest tools (builds will fail if you attempt to use anything previous to Xamarin.iOS 15 and Xcode 13). We have tried building using a host Mac running Xamarin.iOS 15.0.0.6 as well as using a PC and remote connecting to a host Mac to force it to build with Xamarin.iOS 15.0.0.8. We have tried installing the Visual Studio 2022 Preview and using the new Xamarin iOS tools there as well. This issue does not occur on iOS 14.8 devices, only iOS 15.0.x

  1. A summary of the issue is this (this does not happen every attempt of this cycle, sometimes it can take a couple tries, other times it can take more, but rarely is it the first try)
  2. User logs into our App and our landing page is a SyncFusion Calendar control with many events and data load behind it
  3. User then taps into an event which loads a Xamarin TabbedPage and has about 10 inner pages for tabs - again a data heavy load
  4. The user can move around the different tabs fine, scroll up and down data fine, ect within the TabbedPage stacktrace
  5. The user then uses the back button to go back to the SyncFusion Calendar and can at first tap to different dates but then there is a freeze after 1 or 2 seconds and eventual crash with the Report below.

We think this issue has to do with some kind of garbage collection or disposing of the large memory use that the TabbedPage had since the freeze doesn’t happen instantly on ‘Back’ navigation to the SFCalendar Again, that cycle doesn't always happen, the user can repeat steps 3-5 and eventually one of the cycles will result in the below:

    Native Crash Reporting
=================================================================
Got a segv while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
    Native stacktrace:
=================================================================
    0x108a59460 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : mono_dump_native_crash_info
    0x108a4f5d8 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : mono_handle_native_crash
    0x108a5d8e0 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : mono_sigsegv_signal_handler_debug
    0x1f22a1c18 - /usr/lib/system/libsystem_platform.dylib : <redacted>
    0xffffff819ac6da84 - Unknown
    0x19ac6da84 - /usr/lib/libobjc.A.dylib : <redacted>
    0x184d42e34 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
    0x108c17fb0 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : xamarin_invoke_objc_method_implementation
    0x108c18134 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : xamarin_release_trampoline
    0x10265ac74 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : -[Xamarin_Forms_Platform_iOS_PageRenderer release]
    0x182704b2c - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
    0x185471cac - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
    0x19ac73f18 - /usr/lib/libobjc.A.dylib : <redacted>
    0x19ac70c14 - /usr/lib/libobjc.A.dylib : objc_destructInstance
    0x19ac7a338 - /usr/lib/libobjc.A.dylib : _objc_rootDealloc
    0x184e79e80 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
    0x184d42f9c - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
    0x19ac73f18 - /usr/lib/libobjc.A.dylib : <redacted>
    0x19ac70c14 - /usr/lib/libobjc.A.dylib : objc_destructInstance
    0x19ac7a338 - /usr/lib/libobjc.A.dylib : _objc_rootDealloc
    0x184e79e80 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
    0x184d42f9c - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
    0x184f131a0 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
    0x108c1564c - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : xamarin_release_managed_ref
    0x103a35cac - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : wrapper_managed_to_native_Foundation_NSObject_xamarin_release_managed_ref_intptr_bool
    0x1039d9b30 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : Foundation_NSObject_ReleaseManagedRef
    0x1039dce74 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : Foundation_NSObject_NSObject_Disposer_Drain_Foundation_NSObject
    0x102a81d70 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
    0x108a60d28 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : mono_jit_runtime_invoke
    0x108b1a8b4 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : mono_runtime_invoke_checked
    0x108b1e0f4 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : mono_runtime_invoke
    0x1026474e0 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : _ZL31native_to_managed_trampoline_46P11objc_objectP13objc_selectorPP11_MonoMethodS0_j
    0x102647368 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : +[__NSObject_Disposer drain:]
    0x183f35e0c - /System/Library/Frameworks/Foundation.framework/Foundation : <redacted>
    0x182789030 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
    0x182799cf0 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
    0x1826d3ff8 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
    0x1826d9804 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
    0x1826ed3c8 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : CFRunLoopRunSpecific
    0x185093060 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
    0x19defe38c - /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices : GSEventRunModal
    0x184e10b8c - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : UIApplicationMain
    0x103a34688 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr
    0x102a81d70 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
    0x1026907e4 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : Avianis_App_Platorm_Application_Main_string__
    0x108a60d28 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : mono_jit_runtime_invoke
    0x108b1a8b4 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : mono_runtime_invoke_checked
    0x10397b5c0 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : UIKit_UIApplication_Main_string___System_Type_System_Type
    0x108b20b68 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : mono_runtime_exec_main_checked
    0x108a3f138 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : mono_jit_exec
    0x108c24bf4 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : xamarin_main
    0x10268f184 - /private/var/containers/Bundle/Application/B3BD93F9-3D6A-4799-BC38-D4E81FB1A2E0/Avianis.app/Avianis : main
    0x10f49da24 - Unknown
=================================================================
    Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x19ac72378):0x19ac72368  3f 3d 00 f1 a3 
00 00 54 c9 12 40 f9 29 ad 7d 92  ?=
.....T..@.).}.
0x19ac72378  37 01 40 b9 b7 00 00 37 08 
81 7d 92 08 11 40 f9  7.@....7..}...@.
0x19ac72388  08 ad 
7d 92 17 01 40 b9 08 00 80 52 7a d0 3b d5  ..}...@....Rz.;.
0x19ac72398  49 1b 40 b9 f9 8a 20 90 39 f3 24 91 29 7f e8 88  I.@... .
9.$.)...
=================================================================
    Managed Stacktrace:
=================================================================
      at <unknown> <0xffffffff>
      at Foundation.NSObject:xamarin_release_managed_ref <0x00007>
      at Foundation.NSObject:ReleaseManagedRef <0x0004f>
      at NSObject_Disposer:Drain <0x00173>
      at System.Object:runtime_invoke_dynamic <0x0010f>
      at <unknown> <0xffffffff>
      at UIKit.UIApplication:UIApplicationMain <0x00007>
      at UIKit.UIApplication:Main <0x000ef>
      at Avianis.Platorm.Application:Main <0x000a3>
      at System.Object:runtime_invoke_dynamic <0x0010f>
=================================================================```
How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum