xamarin / Essentials

Xamarin.Essentials is no longer supported. Migrate your apps to .NET MAUI, which includes Maui.Essentials.
https://aka.ms/xamarin-upgrade
Other
1.52k stars 506 forks source link

[Bug] Native crash in xamarin.forms due to "Xamarin_Essentials_Xamarin_Essentials_Preferences_Get_string_System_DateTime_string" #2134

Open abdul-wasey opened 7 months ago

abdul-wasey commented 7 months ago

Our xamarin.forms app has faced a native crash for iOS (SIGSEGV). According to the available crash information on App Center, it seems like the crash is related to "Xamarin_Essentials_Preferences" as we can see in the crash logs below :

App Center's Crash Report Details :

MAIN THREAD - CRASHED CoreFoundation mdict_rehashd CoreFoundation -[NSDictionaryM setObject:forKey:] CoreFoundation -[CFPrefsSource mergeIntoDictionary:sourceDictionary:cloudKeyEvaluator:] CoreFoundation -[NSFrozenDictionaryM apply:context:] CoreFoundation -[CFPrefsSource mergeIntoDictionary:sourceDictionary:cloudKeyEvaluator:] CoreFoundation -[CFPrefsSearchListSource alreadylocked_getDictionary:] CoreFoundation -[CFPrefsSearchListSource alreadylocked_copyValueForKey:] CoreFoundation -[CFPrefsSource copyValueForKey:] CoreFoundation -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] CoreFoundation -[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:] CoreFoundation normalizeQuintuplet CoreFoundation -[_CFXPreferences withSearchListForIdentifier:container:cloudConfigurationURL:perform:] CoreFoundation -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] CoreFoundation _CFPreferencesCopyAppValueWithContainerAndConfiguration Foundation -[NSUserDefaults(NSUserDefaults) objectForKey:] wrapper_managed_to_native_ObjCRuntime_Messaging_objc_msgSend_intptr_intptr_intptr NSUserDefaults.g.cs:263 Xamarin_Essentials_Xamarin_Essentials_Preferences_Get_string_System_DateTime_string (D:\a_work\1\s\Xamarin.Essentials\Preferences\Preferences.shared.cs:113) mono_jit_runtime_invoke mini-runtime.c:3190 mono_runtime_invoke_checked object.c:3052 mono_runtime_invoke object.c:3107 native_to_managed_trampoline_8(objc_object, objc_selector, _MonoMethod**, unsigned int) registrar.m:485 -[__MonoMac_NSAsyncSynchronizationContextDispatcher xamarinApplySelector] registrar.m:10473 Foundation NSThreadPerformPerform CoreFoundation CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION CoreFoundation CFRunLoopDoSource0 CoreFoundation CFRunLoopDoSources0 CoreFoundation CFRunLoopRun CoreFoundation CFRunLoopRunSpecific GraphicsServices GSEventRunModal UIKitCore -[UIApplication _run] UIKitCore UIApplicationMain xamarin_UIApplicationMain bindings.m:126 wrapper_managed_to_native_UIKit_UIApplication_xamarin_UIApplicationMain_int_intptr_intptr_intptrintptr UIApplication.cs:58 mono_jit_runtime_invoke mini-runtime.c:3190 mono_runtime_invoke_checked object.c:3052 mono_runtime_exec_main_checked object.c:0 mono_jit_exec driver.c:1383 xamarin_main monotouch-main.m:490 main main.m:260 0x0 + 0

Basic Information