Xarmin iOS App crashes on iOS 18 beta

It's working well on iOS 17 simulator and device. but crashes on iOS 18 beta. It looks like it crashes on a UIviewcontroller page with a UIcollectionView.

Thread finished: <Thread Pool> #65 2024-08-24 17:24:45.240742+0800 GoodTV[26283:7067579] [AppCenterCrashes] ERROR: +[MSWrapperLogger MSWrapperLog:tag:level:]/7 Unhandled Exception: Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Call must be made on main thread Native stack trace: 0 CoreFoundation 0x000000010abfd369 __exceptionPreprocess + 242 1 libobjc.A.dylib 0x0000000111f35106 objc_exception_throw + 62 2 Foundation 0x000000010f1516a8 _userInfoForFileAndLine + 0 3 UIKitCore 0x0000000139d24198 -[_UIDeallocInvalidatable _invalidate] + 185 4 UIKitCore 0x0000000139d24269 -[_UIDeallocInvalidatable dealloc] + 195 5 libobjc.A.dylib 0x0000000111f32bc8 _ZN11objc_object17sidetable_releaseEbb + 204 6 UIKitCore 0x0000000138f1eef4 __destroy_helper_block_e8_32s40s48s56s64s72r + 38 7 libsystem_blocks.dylib 0x00000001150bbb04 _call_dispose_helpers_excp + 45 8 libsystem_blocks.dylib 0x00000001150bc799 _Block_release + 232 9 UIKitCore 0x0000000139213bf8 -[_UIViewControllerTransitionContext .cxx_destruct] + 73 10 libobjc.A.dylib 0x0000000111f12862 _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 83 11 libobjc.A.dylib 0x0000000111f2b22b objc_destructInstance + 61 12 libobjc.A.dylib 0x0000000111f320e0 -[NSObject dealloc] + 19 13 UIKitCore 0x0000000139212549 -[_UIViewControllerTransitionContext dealloc] + 74 14 UIKitCore 0x0000000139213c8b -[_UIViewControllerOneToOneTransitionContext dealloc] + 78 15 libobjc.A.dylib 0x0000000111f32bc8 _ZN11objc_object17sidetable_releaseEbb + 204 16 GoodTV 0x00000001007b1a09 xamarin_dyn_objc_msgSend + 217 17 ??? 0x00000001924a96a2 0x0 + 6749329058 18 ??? 0x000000019556297a 0x0 + 6800419194 19 GoodTV 0x0000000100619971 mono_gc_run_finalize + 721 20 GoodTV 0x000000010070c565 sgen_gc_invoke_finalizers + 197 21 GoodTV 0x000000010061b7c3 finalizer_thread + 723 22 GoodTV 0x00000001006e2f13 start_wrapper_internal + 403 23 GoodTV 0x00000001006e2d5e start_wrapper + 62 24 libsystem_pthread.dylib 0x00000001189e518b _pthread_start + 99 25 libsystem_pthread.dylib 0x00000001189e0ae3 thread_start + 15

at ObjCRuntime.Runtime.ThrowNSException (System.IntPtr ns_exception) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/src/Xamarin.iOS/ObjCRuntime/Runtime.cs:459 at ObjCRuntime.Runtime.throw_ns_exception (System.IntPtr exc) [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/runtime/Delegates.generated.cs:277 at (wrapper native-to-managed) ObjCRuntime.Runtime.throw_ns_exception(intptr) at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend(intptr,intptr) at ObjCRuntime.BaseWrapper.Release () [0x00012] in /Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/src/Xamarin.iOS/ObjCRuntime/BaseWrapper.cs:38 at CoreFoundation.NativeObject.Dispose (System.Boolean disposing) [0x00012] in /Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/src/Xamarin.iOS/CoreFoundation/NativeObject.cs:62 at ObjCRuntime.DisposableObject.Finalize () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/src/Xamarin.iOS/ObjCRuntime/DisposableObject.cs:57 --- End of stack trace from previous location where exception was thrown ---

Xarmin iOS App crashes on iOS 18 beta
 
 
Q