Bug 44898 - Chose a Photo From Gallery Sample crashed on iOS 10
Summary: Chose a Photo From Gallery Sample crashed on iOS 10
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Samples ()
Version: XI 10.0 (iOS10)
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Future Cycle (TBD)
Assignee: German
URL:
Depends on:
Blocks:
 
Reported: 2016-09-29 18:30 UTC by James
Modified: 2016-10-04 20:45 UTC (History)
5 users (show)

Tags:
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:
Status:
RESOLVED FIXED

Description James 2016-09-29 18:30:23 UTC
Issue: When running the sample app for "Choose a Photo from the Gallery" and updating it to iOS 10 it now crashes

The sample in question is found here:
https://github.com/xamarin/recipes/tree/master/ios/media/video_and_photos/choose_a_photo_from_the_gallery

Reproduction
1. Download and update the app to point to iOS 10 (defaults at iOS 5)
2. Run the app and tap the "Picker" button
3. Crashes on an iOS 10 simulator and device, trace below:

2016-09-29 11:25:47.079 MapView[17760:556182] critical: 
Native stacktrace:

2016-09-29 11:25:47.080 MapView[17760:556182] critical: 	0   MapView                             0x00203c5d mono_handle_native_sigsegv + 317
2016-09-29 11:25:47.080 MapView[17760:556182] critical: 	1   MapView                             0x0020da61 sigabrt_signal_handler + 161
2016-09-29 11:25:47.080 MapView[17760:556182] critical: 	2   libsystem_platform.dylib            0x0b33f79b _sigtramp + 43
2016-09-29 11:25:47.080 MapView[17760:556182] critical: 	3   ???                                 0xffffffff 0x0 + 4294967295
2016-09-29 11:25:47.081 MapView[17760:556182] critical: 	4   libsystem_c.dylib                   0x0afdf137 abort + 141
2016-09-29 11:25:47.081 MapView[17760:556182] critical: 	5   libsystem_sim_kernel.dylib          0x0b0a0fd7 __interposition_sim_fallback_abort_with_payload + 0
2016-09-29 11:25:47.081 MapView[17760:556182] critical: 	6   libsystem_sim_kernel.dylib          0x0b0a0ff7 __interposition_sim_fallback_abort_with_payload + 32
2016-09-29 11:25:47.081 MapView[17760:556182] critical: 	7   TCC                                 0x0c9a9621 __CRASHING_DUE_TO_PRIVACY_VIOLATION__ + 236
2016-09-29 11:25:47.081 MapView[17760:556182] critical: 	8   TCC                                 0x0c9a9535 __CRASHING_DUE_TO_PRIVACY_VIOLATION__ + 0
2016-09-29 11:25:47.082 MapView[17760:556182] critical: 	9   TCC                                 0x0c9ac6b9 __tccd_send_block_invoke + 292
2016-09-29 11:25:47.082 MapView[17760:556182] critical: 	10  libxpc.dylib                        0x0b1f179c _xpc_connection_reply_callout + 45
2016-09-29 11:25:47.082 MapView[17760:556182] critical: 	11  libxpc.dylib                        0x0b1e8a97 _xpc_connection_call_reply + 32
2016-09-29 11:25:47.082 MapView[17760:556182] critical: 	12  libdispatch.dylib                   0x0af006ef _dispatch_client_callout + 14
2016-09-29 11:25:47.082 MapView[17760:556182] critical: 	13  libdispatch.dylib                   0x0aee5c60 _dispatch_queue_override_invoke + 777
2016-09-29 11:25:47.083 MapView[17760:556182] critical: 	14  libdispatch.dylib                   0x0aee74bc _dispatch_root_queue_drain + 384
2016-09-29 11:25:47.083 MapView[17760:556182] critical: 	15  libdispatch.dylib                   0x0aee72d4 _dispatch_worker_thread3 + 134
2016-09-29 11:25:47.083 MapView[17760:556182] critical: 	16  libsystem_pthread.dylib             0x0b34f25c _pthread_wqthread + 1050
2016-09-29 11:25:47.083 MapView[17760:556182] critical: 	17  libsystem_pthread.dylib             0x0b34cf56 start_wqthread + 34
2016-09-29 11:25:47.083 MapView[17760:556182] 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.
=================================================================
Comment 1 Vincent Dondain [MSFT] 2016-09-30 11:01:32 UTC
I can confirm this sample issue with the following versions of the product:
https://gist.github.com/VincentDondain/f8633d81cc033534788d9a503d6fb23f
Comment 2 Sebastien Pouliot 2016-09-30 17:03:23 UTC
> __CRASHING_DUE_TO_PRIVACY_VIOLATION__

This is a sample where the Info.plist was not updated for iOS 10.
Comment 3 Joe 2016-10-04 12:04:59 UTC
If you edit the Info.Plist in xcode you can add in a new key value pair to describe the relevant usage, In his instance it's named "Privacy - Photo Library Usage Description" and it will prompt the user for permissions to access their gallery when they try to run the gallery from code. This is the 'work around' but also the correct way of doing this. However I have to admit there should be a built in method for handling a permissions exception like this. You can find more information on this at https://blog.xamarin.com/new-ios-10-privacy-permission-settings/
Comment 4 German 2016-10-04 20:45:34 UTC
Fixed, waiting for merge: https://github.com/xamarin/recipes/pull/27