Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enumerating contacts retrieved by GetAllAsync traps #22957

Closed
tg2-mygovus opened this issue Jun 10, 2024 · 10 comments
Closed

Enumerating contacts retrieved by GetAllAsync traps #22957

tg2-mygovus opened this issue Jun 10, 2024 · 10 comments
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info platform/iOS 🍎 s/needs-info Issue needs more info from the author t/bug Something isn't working

Comments

@tg2-mygovus
Copy link

Description

In .NET MAUI (targeting net8.0-ios), the following code aborts (catch doesn't catch):

var contacts = await ContactsManager.Default.GetAllAsync();

await Task.Run(() =>
{
    foreach (var contact in contacts)
    {
        MainThread.BeginInvokeOnMainThread(() => ContactsList.Add(contact));
    }
});

When trying to iterate over the list of contacts (in the foreach).

what's interesting is I can retrieve one contact with

await ContactsManager.Default.PickContactAsync()

I've only been able to test this in the simulator. And allow access to contacts is enabled.

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.21 SR4.1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@tg2-mygovus tg2-mygovus added the t/bug Something isn't working label Jun 10, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@jsuarezruiz jsuarezruiz added platform/iOS 🍎 area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info labels Jun 11, 2024
@drasticactions
Copy link
Contributor

Could you please make a sample showing how you're implementing this code?

Seeing "MainThread.BeginInvokeOnMainThread", I think that may be your issue. If you want to interact with the UI thread, you should use MAUI's Dispatcher, something like

var contacts = await ContactsManager.Default.GetAllAsync();

await Task.Run(() =>
{
    foreach (var contact in contacts)
    {
        Microsoft.Maui.Controls.Application.Current!.Dispatcher.Dispatch(() => ContactsList.Add(contact));
    }
});

Although I'm not sure why you're putting this in a Task only to dispatch back on the UIThread? I think we need more context for what you're doing.

@drasticactions drasticactions added the s/needs-info Issue needs more info from the author label Jun 11, 2024
@tg2-mygovus
Copy link
Author

I'd based it on the example found here:
https://github.com/dotnet/maui-samples/tree/main/8.0/PlatformIntegration/PlatformIntegrationDemos

Since it's trapping when beginning the enumeration, it doesn't matter what's inside the foreach. However, I tried your suggestion and it still traps. A simplified example that still traps:

        var contacts = await ContactsManager.Default.GetAllAsync();

        foreach (var contact in contacts)
        {
            //Do Something with contact
        }

@drasticactions
Copy link
Contributor

I wrote a sample:

https://github.com/drasticactions/MauiRepros/tree/main/ContactsTest

I can't get it to fail.

スクリーンショット 2024-06-11 23 18 29

Can you run this and see if it works for you? This is the Essentials code it's calling,

public Task<IEnumerable<Contact>> GetAllAsync(CancellationToken cancellationToken)

@rolfbjarne Would you know of other ways to debug this?

@rolfbjarne
Copy link
Member

@rolfbjarne Would you know of other ways to debug this?

A crash report might give clues: https://github.com/xamarin/xamarin-macios/wiki/Diagnosis#crash-reports

Also is anything printed in the application output when the ap crashes?

@tg2-mygovus
Copy link
Author

@drasticactions your code does the same as mine.
@rolfbjarne here's what shows up in the Output window:

Native Crash Reporting

=================================================================
Got a SIGABRT 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:

0x1030700a0 - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : mono_dump_native_crash_info
0x10302028c - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : mono_handle_native_crash
0x103342bc8 - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : sigabrt_signal_handler.cold.1
0x10306f960 - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : mono_runtime_setup_stat_profiler
0x1014bb7e0 - /usr/lib/system/libsystem_platform.dylib : _sigtramp
0x1025f7124 - /usr/lib/system/libsystem_pthread.dylib : pthread_kill
0x1801655c0 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_c.dylib : abort
0x1801e378c - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_malloc.dylib : malloc_vreport
0x1801e3950 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_malloc.dylib : malloc_report
0x1801d78a0 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_malloc.dylib : find_zone_and_free
0x181dbffb0 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libicucore.A.dylib : _ZN3icu6Locale10setToBogusEv
0x181dc1954 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libicucore.A.dylib : _ZN3icu6LocaleaSERKS0_
0x181f2f5f4 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libicucore.A.dylib : _ZN3icu6number24LocalizedNumberFormatterC2EONS0_4impl10MacroPropsERKNS_6LocaleE
0x181edb494 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libicucore.A.dylib : _ZN3icu13DecimalFormat5touchER10UErrorCode
0x181dc437c - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libicucore.A.dylib : _ZN3icu13DecimalFormatC1ERKNS_13UnicodeStringEPNS_20DecimalFormatSymbolsER11UParseErrorR10UErrorCode
0x181dc13ec - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libicucore.A.dylib : unum_open
0x1804a0bb0 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : __cficu_unum_open
0x1803e158c - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : CFNumberFormatterCreate
0x180d8e00c - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation : -[NSNumberFormatter _regenerateFormatter]
0x180d960f4 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation : -[NSNumberFormatter setMaximumSignificantDigits:]
0x18e938638 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/ContactsFoundation.framework/ContactsFoundation : +[CNTimeIntervalFormatter numberFormatterWithSignificantDigits:]
0x18e938528 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/ContactsFoundation.framework/ContactsFoundation : __54-[CNTimeIntervalFormatter numberFormatterWith3SigFigs]_block_invoke
0x18e92e050 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/ContactsFoundation.framework/ContactsFoundation : __cn_objectResultWithObjectLock_block_invoke
0x18e92df18 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/ContactsFoundation.framework/ContactsFoundation : cn_runWithObjectLock
0x18e92dfd0 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/ContactsFoundation.framework/ContactsFoundation : cn_objectResultWithObjectLock
0x18e9384e8 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/ContactsFoundation.framework/ContactsFoundation : -[CNTimeIntervalFormatter numberFormatterWith3SigFigs]
0x18e9387ec - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/ContactsFoundation.framework/ContactsFoundation : -[CNTimeIntervalFormatter stringForTimeInterval:]
0x18e938710 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/ContactsFoundation.framework/ContactsFoundation : +[CNTimeIntervalFormatter stringForTimeInterval:]
0x18aa6f1ac - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Contacts.framework/Contacts : -[CNAPITriageLogger didExecuteFetchRequest:duration:]
0x18aa6fa7c - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Contacts.framework/Contacts : -[CNAPITriageSession closeWithContacts:]
0x18aa04560 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Contacts.framework/Contacts : __79-[CNDataMapperContactStore unifiedContactsMatchingPredicate:keysToFetch:error:]_block_invoke.57
0x18aa65a70 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Contacts.framework/Contacts : __38-[_CNContactsLogger fetchingContacts:]_block_invoke_2
0x18009dba4 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_trace.dylib : os_activity_apply_f
0x18aa659e0 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Contacts.framework/Contacts : -[_CNContactsLogger fetchingContacts:]
0x18aa04264 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Contacts.framework/Contacts : -[CNDataMapperContactStore unifiedContactsMatchingPredicate:keysToFetch:error:]
0x18a984cf8 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Contacts.framework/Contacts : __78-[CNAggregateContactStore unifiedContactsMatchingPredicate:keysToFetch:error:]_block_invoke.24
0x18a983d6c - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Contacts.framework/Contacts : __63-[CNAggregateContactStore _allStoreResultsWithError:withBlock:]_block_invoke
0x18a983e6c - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Contacts.framework/Contacts : -[CNAggregateContactStore _enumerateStoresUsingBlock:]
0x18a983c9c - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Contacts.framework/Contacts : -[CNAggregateContactStore _allStoreResultsWithError:withBlock:]
0x18a984b58 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Contacts.framework/Contacts : -[CNAggregateContactStore unifiedContactsMatchingPredicate:keysToFetch:error:]
0x102994b8c - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libxamarin-dotnet-debug.dylib : xamarin_dyn_objc_msgSend
0x103080950 - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : do_icall
0x10307f1f0 - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : do_icall_wrapper
0x103073c3c - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : mono_interp_exec_method
0x103071810 - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : interp_runtime_invoke
0x102f8aa74 - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : mono_jit_runtime_invoke
0x1031469c0 - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : mono_runtime_try_invoke
0x103149a38 - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : mono_runtime_invoke
0x100f5af8c - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/SwipeRight.Maui : _ZL30native_to_managed_trampoline_9P11objc_objectP13objc_selectorPP11_MonoMethodj
0x100fabcd8 - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/SwipeRight.Maui : -[UIKit_UIControlEventProxy BridgeSelector]
0x1853d58ec - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : -[UIApplication sendAction:to:from:forEvent:]
0x184ce23d0 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : -[UIControl sendAction:to:forEvent:]
0x184ce2714 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : -[UIControl _sendActionsForEvents:withEvent:]
0x184cdf188 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : -[UIButton _sendActionsForEvents:withEvent:]
0x184ce13ac - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : -[UIControl touchesEnded:withEvent:]
0x184f0b6e4 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : _UIGestureEnvironmentUpdate
0x184f09cec - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:]
0x184f09a5c - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : -[UIGestureEnvironment _updateForEvent:window:]
0x18540a868 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : -[UIWindow sendEvent:]
0x1853ea238 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : -[UIApplication sendEvent:]
0x18546dff4 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : __dispatchPreprocessedEventFromEventQueue
0x185470e90 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : __processEventQueue
0x1854697f0 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : __eventFetcherSourceCallback
0x18040ee48 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
0x18040ed90 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : __CFRunLoopDoSource0
0x18040e500 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : __CFRunLoopDoSources0
0x180408be8 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : __CFRunLoopRun
0x1804084d4 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : CFRunLoopRunSpecific
0x18ef2aae4 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices : GSEventRunModal
0x1853d0a28 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : -[UIApplication _run]
0x1853d46b0 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : UIApplicationMain
0x10294ff00 - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libxamarin-dotnet-debug.dylib : xamarin_UIApplicationMain
0x103080950 - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : do_icall
0x10307f1f0 - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : do_icall_wrapper
0x103073c3c - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : mono_interp_exec_method
0x103071810 - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : interp_runtime_invoke
0x102f8aa74 - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : mono_jit_runtime_invoke
0x1031459ac - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : mono_runtime_invoke_checked
0x10314cf8c - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : mono_runtime_exec_main_checked
0x102fded3c - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libmonosgen-2.0.dylib : mono_jit_exec
0x102993b00 - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/libxamarin-dotnet-debug.dylib : xamarin_main
0x10101ab3c - /Users/tom/Library/Developer/CoreSimulator/Devices/F44C1878-D450-4C39-B128-292A7C8D6485/data/Containers/Bundle/Application/2A1B694F-F16D-429A-81CB-4696BE53FDA3/SwipeRight.Maui.app/SwipeRight.Maui : main
0x101595544 - Unknown
0x10165a0e0 - Unknown
0x577b000000000000 - Unknown

=================================================================
Basic Fault Address Reporting

Memory around native instruction pointer (0x1024813b0):0x1024813a0 c0 03 5f d6 c0 03 5f d6 10 29 80 d2 01 10 00 d4 .......)......
0x1024813b0 e3 00 00 54 fd 7b bf a9 fd 03 00 91 cd e2 ff 97 ...T.{..........
0x1024813c0 bf 03 00 91 fd 7b c1 a8 c0 03 5f d6 c0 03
5f d6 .....{........
0x1024813d0 70 0a 80 d2 01 10 00 d4 e3 00 00 54 fd 7b bf a9 p
..........T.{..

=================================================================
Managed Stacktrace:

  at <unknown> <0xffffffff>
  at ObjCRuntime.Messaging:NativeHandle_objc_msgSend_NativeHandle_NativeHandle_ref_NativeHandle <0x000c2>
  at Contacts.CNContactStore:GetUnifiedContacts <0x0011c>
  at Contacts.CNContactStore:GetUnifiedContacts <0x00074>
  at <<GetAllAsync>g__GetEnumerable|0>d:MoveNext <0x00188>
  at <LoadContactsAsync>d__2:MoveNext <0x00260>
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x00094>
  at System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start <0x00016>
  at SwipeRight.Maui.Views.ContactsPage:LoadContactsAsync <0x000aa>
  at Microsoft.Maui.Controls.Button:Microsoft.Maui.Controls.Internals.IButtonElement.PropagateUpClicked <0x0004c>
  at Microsoft.Maui.Controls.ButtonElement:ElementClicked <0x000a6>
  at Microsoft.Maui.Controls.Button:SendClicked <0x00020>
  at Microsoft.Maui.Controls.Button:Microsoft.Maui.IButton.Clicked <0x0001e>
  at ButtonEventProxy:OnButtonTouchUpInside <0x0006c>
  at UIKit.UIControlEventProxy:Activated <0x0005c>
  at System.Object:runtime_invoke_direct_void__this__ <0x00088>
  at <unknown> <0x00000>
  at <unknown> <0xffffffff>
  at UIKit.UIApplication:xamarin_UIApplicationMain <0x000b8>
  at UIKit.UIApplication:UIApplicationMain <0x0006e>
  at UIKit.UIApplication:Main <0x0015a>
  at SwipeRight.Maui.Program:Main <0x0002c>
  at <Module>:runtime_invoke_direct_void_string[] <0x0007e>
  at <unknown> <0x00000>

=========================================

@tg2-mygovus
Copy link
Author

@drasticactions let me clarify -- your code also traps.

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Jun 11, 2024
@rolfbjarne
Copy link
Member

_ZN3icu6Locale10setToBogusEv

That's dotnet/runtime#98941, which has been fixed in the latest .NET version.

Please make sure you're using the latest .NET (8.0.300) and try again. If it still fails, please provide a binlog (https://github.com/xamarin/xamarin-macios/wiki/Diagnosis#binary-build-logs).

@drasticactions
Copy link
Contributor

Ahhh, okay. That would explain it.

@tg2-mygovus Can you upgrade your dotnet?

@drasticactions drasticactions added s/needs-info Issue needs more info from the author and removed s/needs-attention Issue has more information and needs another look labels Jun 11, 2024
@tg2-mygovus
Copy link
Author

That got it!! Thank you :)

@github-actions github-actions bot locked and limited conversation to collaborators Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info platform/iOS 🍎 s/needs-info Issue needs more info from the author t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants