Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8714911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:43:11+00:00 2026-06-13T05:43:11+00:00

Building against MT 6.0.4. Targeting iOS 4. Testing on an iPhone 4S. I’m stumped

  • 0

Building against MT 6.0.4.
Targeting iOS 4.
Testing on an iPhone 4S.

I’m stumped as to what I am doing wrong. I display the ABPeoplePickerNavigationController modally after subscribing to the SelectPerson event. Within the event, I take a copy of the data I need (only holding references to strings, not to any of the AdressBook or Person instances), and then close the modal dialog:

private string selectedPersonFirstName;
private string selectedPersonEmail;
private string selectedPersonPhone;

private void SelectContact()
{
    var peoplePicker = new ABPeoplePickerNavigationController();
    peoplePicker.Cancelled += (sender, e) => 
    {
        selectedPersonFirstName = null;
        selectedPersonEmail = null;
        selectedPersonPhone = null;
        peoplePicker.DismissViewController(true, null);
    };
    peoplePicker.SelectPerson += (sender, e) => 
    {
        var selectedName = String.Format("{0} {1}", e.Person.FirstName, e.Person.LastName);
        selectedPersonFirstName = e.Person.FirstName;
        if ( e.Person.GetEmails().Count > 0)
            selectedPersonEmail = e.Person.GetEmails().FirstOrDefault().Value;
        if ( e.Person.GetPhones().Count > 0)
            selectedPersonPhone = e.Person.GetPhones().FirstOrDefault().Value;

        peoplePicker.DismissViewController(true, null);
    };

    PresentViewController(peoplePicker, true, null);
}

At some point later when the GC kicks in, it crashes:

Stacktrace:

  at MonoTouch.Foundation.NSObject.FinishDispose () [0x0000b] in /Developer/MonoTouch/Source/monotouch/src/Foundation/NSObject.cs:158
  at MonoTouch.Foundation.NSObject/MonoTouch_Disposer.Drain (MonoTouch.Foundation.NSObject) [0x00062] in /Developer/MonoTouch/Source/monotouch/src/Foundation/NSObject.cs:376
  at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
  at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
  at MyApp.iOS.Application.Main (string[]) [0x00000] in /Users/tyson/Code/MyApp/iOS/Main.cs:19
  at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

    0   MyAppName---------------            0x00f574f4 mono_handle_native_sigsegv + 280
    1   MyAppName---------------            0x00f3a2b8 mono_sigsegv_signal_handler + 268
    2   libsystem_c.dylib                   0x31ae97ed _sigtramp + 48
    3   CoreFoundation                      0x3745b2e7 CFRelease + 94
    4   AddressBookUI                       0x373922d1 -[ABGroupWrapper dealloc] + 100
    5   libobjc.A.dylib                     0x35a14175 _objc_rootRelease + 36
    6   AddressBookUI                       0x373a3f57 -[ABModel dealloc] + 146
    7   libobjc.A.dylib                     0x35a14175 _objc_rootRelease + 36
    8   AddressBookUI                       0x373aec43 -[ABAbstractViewController dealloc] + 38
    9   AddressBookUI                       0x373aeb3d -[ABMembersViewController dealloc] + 216
    10  libobjc.A.dylib                     0x35a14175 _objc_rootRelease + 36
    11  CoreFoundation                      0x3745b2e7 CFRelease + 94
    12  CoreFoundation                      0x3747106b -[__NSArrayM dealloc] + 122
    13  libobjc.A.dylib                     0x35a14175 _objc_rootRelease + 36
    14  UIKit                               0x33c891b9 -[UIViewController dealloc] + 496
    15  UIKit                               0x33c88f2f -[UINavigationController dealloc] + 198
    16  AddressBookUI                       0x373adcbd -[ABPeoplePickerNavigationController dealloc] + 376
    17  libobjc.A.dylib                     0x35a14175 _objc_rootRelease + 36
    18  MyAppName---------------            0x001e1ccc wrapper_managed_to_native_MonoTouch_ObjCRuntime_Messaging_void_objc_msgSend_intptr_intptr + 68
    19  MyAppName---------------            0x001ad49c MonoTouch_Foundation_NSObject_MonoTouch_Disposer_Drain_MonoTouch_Foundation_NSObject + 364
    20  MyAppName---------------            0x006997b8 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
    21  MyAppName---------------            0x00f3c6a4 mono_jit_runtime_invoke + 1644
    22  MyAppName---------------            0x00ff5dc0 mono_runtime_invoke + 128
    23  MyAppName---------------            0x00f2c6ec native_to_managed_trampoline_MonoTouch_Foundation_NSObject_MonoTouch_Disposer_Drain + 280
    24  CoreFoundation                      0x374a0eef +[NSObject performSelector:withObject:] + 42
    25  Foundation                          0x37d51747 __NSThreadPerformPerform + 350
    26  CoreFoundation                      0x374e6ad3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
    27  CoreFoundation                      0x374e629f __CFRunLoopDoSources0 + 214
    28  CoreFoundation                      0x374e5045 __CFRunLoopRun + 652
    29  CoreFoundation                      0x374684a5 CFRunLoopRunSpecific + 300
    30  CoreFoundation                      0x3746836d CFRunLoopRunInMode + 104
    31  GraphicsServices                    0x32375439 GSEventRunModal + 136
    32  UIKit                               0x33bece7d UIApplicationMain + 1080
    33  MyAppName---------------            0x001e6ca4 wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 240
    34  MyAppName---------------            0x00ee0210 MyApp_iOS_Application_Main_string__ + 152
    35  MyAppName---------------            0x006997b8 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
    36  MyAppName---------------            0x00f3c6a4 mono_jit_runtime_invoke + 1644
    37  MyAppName---------------            0x00ff5dc0 mono_runtime_invoke + 128
    38  MyAppName---------------            0x00ffa224 mono_runtime_exec_main + 436
    39  MyAppName---------------            0x00fff770 mono_runtime_run_main + 756
    40  MyAppName---------------            0x00f434a4 mono_jit_exec + 140
    41  MyAppName---------------            0x0105c04c main + 2028
    42  MyAppName---------------            0x0001bd18 start + 40

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

Has anyone seen anything like this before? I’m up for workarounds at this point as I need it more reliable for a demo ASAP (not for app store submission yet).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:43:12+00:00Added an answer on June 13, 2026 at 5:43 am

    It looks like a bug. Something gets released one time too many and crash.

    You can, for your demonstration purpose, work around it by defining CFRetain like this:

    [System.Runtime.InteropServices.DllImport ("/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation")]
    static extern IntPtr CFRetain (IntPtr obj);
    

    and use it on the _AddressBook, like that

    peoplePicker.SelectPerson += (sender, e) => {
        CFRetain (peoplePicker._AddressBook);
        var selectedName = String.Format("{0} {1}", e.Person.FirstName, e.Person.LastName);
        ...
    

    That will balance the count and avoid the crash.

    Update: bug filled, you can c.c. yourself the the bug report to know when a fix will be released.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After building my iPad app against iOS 6.0 SDK, I get this weird behavior
I have a library project in Xcode 4. I'm building against iOS 4.3. The
I'm building a simple play against a random opponent back-end using Goole App Engine.
I'm building a little search application (I know I can use match against). But
I've been banging my head against this for the past few hours. I'm building
using a c# asp.net page, building a SQL query string to run against an
I was recently building a certain shared library (ELF) targeting x86-64 architecture, like this:
I'm planning on writing an app and building against 2.2 Froyo (API Level 8).
I've come across some places in java libraries that I'm building against where the
I recently started compiling my iPhone application against the 3.0 OS. The app worked

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.