Bug 44422 - Native crash when calling CNContactStore.GetContainers on iOS 10/Xcode 9
Summary: Native crash when calling CNContactStore.GetContainers on iOS 10/Xcode 9
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 10.0 (iOS10)
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2016-09-16 16:36 UTC by Cody Beyer (MSFT)
Modified: 2016-09-16 17:59 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Cody Beyer (MSFT) 2016-09-16 16:36:49 UTC
# Description

The following sample app instantiates a CNContactStore and then attempts to pull contacts. At the point of calling GetContainers, a native crash occurs

# Native Trace

>Native stacktrace:
>2016-09-16 09:29:50.556 CnContactStoreCrash.iOS[45145:1365021] critical: 	0   CnContactStoreCrash.iOS             0x0021856d >mono_handle_native_sigsegv + 317
>2016-09-16 09:29:50.556 CnContactStoreCrash.iOS[45145:1365021] critical: 	1   CnContactStoreCrash.iOS             0x00222371 >sigabrt_signal_handler + 161
>2016-09-16 09:29:50.556 CnContactStoreCrash.iOS[45145:1365021] critical: 	2   libsystem_platform.dylib            0x0b3cfebb _sigtramp >+ 43
>2016-09-16 09:29:50.557 CnContactStoreCrash.iOS[45145:1365021] critical: 	3   ???                                 0xffffffff 0x0 + 4294967295
>2016-09-16 09:29:50.557 CnContactStoreCrash.iOS[45145:1365021] critical: 	4   libsystem_kernel.dylib              0x0b2d68bc >abort_with_payload + 38
>2016-09-16 09:29:50.558 CnContactStoreCrash.iOS[45145:1365021] critical: 	5   TCC                                 0x0ca39621 >__CRASHING_DUE_TO_PRIVACY_VIOLATION__ + 236
>2016-09-16 09:29:50.558 CnContactStoreCrash.iOS[45145:1365021] critical: 	6   TCC                                 0x0ca39535 >__CRASHING_DUE_TO_PRIVACY_VIOLATION__ + 0
>2016-09-16 09:29:50.558 CnContactStoreCrash.iOS[45145:1365021] critical: 	7   TCC                      
>          0x0ca3c6b9 __tccd_send_block_invoke + 292
>2016-09-16 09:29:50.558 CnContactStoreCrash.iOS[45145:1365021] critical: 	8   libxpc.dylib                        0x0b28079c >_xpc_connection_reply_callout + 45
>2016-09-16 09:29:50.559 CnContactStoreCrash.iOS[45145:1365021] critical: 	9   libxpc.dylib                        0x0b277a97 >_xpc_connection_call_reply + 32
>2016-09-16 09:29:50.559 CnContactStoreCrash.iOS[45145:1365021] critical: 	10  libdispatch.dylib                   0x0af8f6ef >_dispatch_client_callout + 14
>2016-09-16 09:29:50.559 CnContactStoreCrash.iOS[45145:1365021] critical: 	11  libdispatch.dylib                   0x0af74c60 >_dispatch_queue_override_invoke + 777
>2016-09-16 09:29:50.559 CnContactStoreCrash.iOS[45145:1365021] critical: 	12  libdispatch.dylib                   0x0af764bc >_dispatch_root_queue_drain + 384
>2016-09-16 09:29:50.559 CnContactStoreCrash.iOS[45145:1365021] critical: 	13  libdispatch.dylib                   0x0af762d4 >_dispatch_worker_thread3 + 134
>2016-09-16 09:29:50.560 CnContactStoreCrash.iOS[45145:1365021] critical: 	14  libsystem_pthread.dylib             0x0b3dfd6e >_pthread_wqthread + 1070
>2016-09-16 09:29:50.560 CnContactStoreCrash.iOS[45145:1365021] critical: 	15  libsystem_pthread.dylib             0x0b3df91a >start_wqthread + 34
>2016-09-16 09:29:50.560 CnContactStoreCrash.iOS[45145:1365021] critical: 
>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.

# Sample


# Steps to Reproduce 

	1. Download sample
	2. Deploy to iOS Simulator running iOS 10

# Expected Results

Contacts should be queried

# Actual Results

Crash occurs

# Versions

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Architecture and Modeling Tools   00322-80000-00000-AA350
Microsoft Architecture and Modeling Tools
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

LightSwitch for Visual Studio 2015   00322-80000-00000-AA350
Microsoft LightSwitch for Visual Studio 2015

Visual Basic 2015   00322-80000-00000-AA350
Microsoft Visual Basic 2015

Visual C# 2015   00322-80000-00000-AA350
Microsoft Visual C# 2015

Visual C++ 2015   00322-80000-00000-AA350
Microsoft Visual C++ 2015

Visual F# 2015   00322-80000-00000-AA350
Microsoft Visual F# 2015

Windows Phone SDK 8.0 - ENU   00322-80000-00000-AA350
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   7.6.00907.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1   14.1.20907.0
ASP.NET and Web Tools 2015.1

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.8.1   14.0.11123.0
Azure App Service Tools v2.8.1

Command Bus, Event Stream and Async Manager   Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.

Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

Microsoft .NET Core Tools (Preview 2)   14.1.20907.0
Microsoft .NET Core Tools (Preview 2)

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager   3.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

Python Tools for Visual Studio   2.2.40825.00
Python Tools for Visual Studio provides IntelliSense, projects, templates, Interactive windows, and other support for Python developers.

Python Tools for Visual Studio - Django Integration   2.2.40825.00
Provides templates and integration for the Django web framework.

Python Tools for Visual Studio - Profiling Support   2.2.40825.00
Profiling support for Python projects.

SQL Server Data Tools   14.0.60519.0
Microsoft SQL Server Data Tools

TypeScript tools for Visual Studio

Visual Studio Tools for Universal Windows Apps   14.0.25527.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin (c4382f5)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android (0e59c36)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS (6c3fee4)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 1 Sebastien Pouliot 2016-09-16 17:59:53 UTC
From your stack trace


^ see release notes