Bug 46186 - MediaPicker causes app to crash on iPhone5c, not on iPhone 4s
Summary: MediaPicker causes app to crash on iPhone5c, not on iPhone 4s
Status: RESOLVED ANSWERED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 10.0 (iOS10)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
: 45811 ()
Depends on:
Blocks:
 
Reported: 2016-10-31 13:04 UTC by Shay
Modified: 2016-10-31 21:48 UTC (History)
3 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 ANSWERED

Description Shay 2016-10-31 13:04:15 UTC
I am experiencing crashes on iPhone 5c running the sample app given by Xamarin for Media Picker with Xamarin Forms.
I think this is related to iOS, but I am not sure (I hope I am posting this in the right channel).
Ways to reproduce on my iPhone 5c:
1. Download https://components.xamarin.com/gettingstarted/xamarin.mobile
2. Run the sample project for Unified iOS (choose Media Picker Project)
3. Run the program and select "Pick a Photo".

I can only reproduce this on my iPhone 5c. It works like a charm on my iPhone 4s.

Crash report:


Using Xcode 8.0 found in /Applications/Xcode.app/Contents/Developer
Xamarin.Hosting: Xamarin.Hosting
Xamarin.Hosting:     Xcode: /Applications/Xcode.app
Xamarin.Hosting:     Xcode Version: 8.0
Xamarin.Hosting:     Verbosity: 10
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/DVTFoundation
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTiPhoneSimulatorRemoteClient.framework/DVTiPhoneSimulatorRemoteClient
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/CoreSimulator
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/DTDeviceKitBase
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/DVTKit
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKit.framework/DTDeviceKit
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DTXConnectionServices.framework/DTXConnectionServices
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTSourceControl.framework/DVTSourceControl
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTServices.framework/DVTServices
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTPortal.framework/DVTPortal
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/Frameworks/libswiftCore.dylib
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/Frameworks/libswiftDarwin.dylib
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/Frameworks/libswiftObjectiveC.dylib
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/Frameworks/libswiftDispatch.dylib
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/Frameworks/libswiftXPC.dylib
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/Frameworks/libswiftos.dylib
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/Frameworks/libswiftIOKit.dylib
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/Frameworks/libswiftCoreGraphics.dylib
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/Frameworks/libswiftFoundation.dylib
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/Frameworks/libswiftCoreData.dylib
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/Frameworks/libswiftCoreImage.dylib
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/Frameworks/libswiftAppKit.dylib
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTDocumentation.framework/DVTDocumentation
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTAnalyticsClient.framework/DVTAnalyticsClient
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTAnalytics.framework/DVTAnalytics
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/SourceKit
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework/IDEFoundation
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DTGraphKit.framework/DTGraphKit
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTDeveloperModeHelper.framework/DVTDeveloperModeHelper
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DADocSetAccess.framework/DADocSetAccess
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DADocSetManagement.framework/DADocSetManagement
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTProducts.framework/DVTProducts
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/IDEKit
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/Frameworks/IBFoundation.framework/IBFoundation
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/Frameworks/IBAutolayoutFoundation.framework/IBAutolayoutFoundation
Xamarin.Hosting: Loaded Xcode plugins successfully.
Xamarin.Hosting: Device discovery started
Xamarin.Hosting: Device discovery event: Connected
Xamarin.Hosting: Device discovery event: Connected
Xamarin.Hosting: Device discovery event: GizmoPaired
Xamarin.Hosting: Watch discovery event: GizmoPaired
Xamarin.Hosting: Device discovery event: Connected
Xamarin.Hosting: Mounting developer image on 'iPhone5c'
Xamarin.Hosting: Mounted developer image on 'iPhone5c'
Xamarin.Hosting: Launched com.xamarin.mobile.mediapickersample with PID: 724
Launched application 'com.xamarin.mobile.mediapickersample' on 'iPhone5c' with pid 724
2016-10-31 08:56:39.298 MediaPickerSample[724:331296] Xamarin.iOS: IDE Port: 10000 Transport: USB
2016-10-31 08:56:39.339 MediaPickerSample[724:331296] Xamarin.iOS: Successfully received USB connection from the IDE on port 10000, fd: 4
2016-10-31 08:56:39.339 MediaPickerSample[724:331296] Xamarin.iOS: Processing: 'start debugger: sdb'
2016-10-31 08:56:39.340 MediaPickerSample[724:331275] Xamarin.iOS: Debugger loaded with custom transport (fd: 4)
2016-10-31 08:56:39.343 MediaPickerSample[724:331296] Xamarin.iOS: Successfully received USB connection from the IDE on port 10000, fd: 5
2016-10-31 08:56:39.343 MediaPickerSample[724:331296] Xamarin.iOS: Processing: 'connect output'
2016-10-31 08:56:39.344 MediaPickerSample[724:331296] Xamarin.iOS: Successfully received USB connection from the IDE on port 10000, fd: 6
2016-10-31 08:56:39.344 MediaPickerSample[724:331296] Xamarin.iOS: Processing: 'start profiler: no'
2016-10-31 08:56:39.345 MediaPickerSample[724:331275] Xamarin.iOS: Profiler not loaded (disabled)
Loaded assembly: /private/var/containers/Bundle/Application/B4729CA7-425A-4460-90F1-118B6ECF0BCB/MediaPickerSample.app/.monotouch-32/System.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B4729CA7-425A-4460-90F1-118B6ECF0BCB/MediaPickerSample.app/.monotouch-32/Xamarin.iOS.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B4729CA7-425A-4460-90F1-118B6ECF0BCB/MediaPickerSample.app/.monotouch-32/Mono.Dynamic.Interpreter.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B4729CA7-425A-4460-90F1-118B6ECF0BCB/MediaPickerSample.app/.monotouch-32/System.Core.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B4729CA7-425A-4460-90F1-118B6ECF0BCB/MediaPickerSample.app/.monotouch-32/Xamarin.Mobile.dll [External]
Thread started:  #2
Loaded assembly: /private/var/containers/Bundle/Application/B4729CA7-425A-4460-90F1-118B6ECF0BCB/MediaPickerSample.app/.monotouch-32/System.Json.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B4729CA7-425A-4460-90F1-118B6ECF0BCB/MediaPickerSample.app/.monotouch-32/MonoTouch.Dialog-1.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B4729CA7-425A-4460-90F1-118B6ECF0BCB/MediaPickerSample.app/.monotouch-32/MediaPickerSample.exe
2016-10-31 08:56:44.019 MediaPickerSample[724:331293] critical: 
Native stacktrace:

2016-10-31 08:56:44.081 MediaPickerSample[724:331293] critical: 	0   MediaPickerSample                   0x000def11 mono_handle_native_sigsegv + 240
2016-10-31 08:56:44.081 MediaPickerSample[724:331293] critical: 	1   libsystem_platform.dylib            0x1b5b326d _sigtramp + 24
2016-10-31 08:56:44.081 MediaPickerSample[724:331293] critical: 	2   libsystem_kernel.dylib              0x1b4ffd8f <redacted> + 64
2016-10-31 08:56:44.082 MediaPickerSample[724:331293] critical: 	3   libsystem_kernel.dylib              0x1b4ffdd9 system_set_sfi_window + 0
2016-10-31 08:56:44.082 MediaPickerSample[724:331293] critical: 	4   TCC                                 0x1dc08e85 <redacted> + 228
2016-10-31 08:56:44.082 MediaPickerSample[724:331293] critical: 	5   TCC                                 0x1dc08da1 <redacted> + 0
2016-10-31 08:56:44.083 MediaPickerSample[724:331293] critical: 	6   TCC                                 0x1dc0b57b <redacted> + 276
2016-10-31 08:56:44.083 MediaPickerSample[724:331293] critical: 	7   libxpc.dylib                        0x1b5e915f <redacted> + 46
2016-10-31 08:56:44.083 MediaPickerSample[724:331293] critical: 	8   libxpc.dylib                        0x1b5e9101 <redacted> + 26
2016-10-31 08:56:44.084 MediaPickerSample[724:331293] critical: 	9   libdispatch.dylib                   0x1b40e49b <redacted> + 604
2016-10-31 08:56:44.084 MediaPickerSample[724:331293] critical: 	10  libdispatch.dylib                   0x1b40fa91 <redacted> + 378
2016-10-31 08:56:44.084 MediaPickerSample[724:331293] critical: 	11  libdispatch.dylib                   0x1b40f8b7 <redacted> + 106
2016-10-31 08:56:44.084 MediaPickerSample[724:331293] critical: 	12  libsystem_pthread.dylib             0x1b5b5947 _pthread_wqthread + 1168
2016-10-31 08:56:44.085 MediaPickerSample[724:331293] critical: 	13  libsystem_pthread.dylib             0x1b5b549c start_wqthread + 8
2016-10-31 08:56:44.085 MediaPickerSample[724:331293] 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.
=================================================================



System details:
Xamarin Studio Business
Version 6.1.2 (build 38)
Installation UUID: 07360e74-2c80-443b-94a1-6221c776bc97
Runtime:
	Mono 4.6.1 (mono-4.6.0-branch/2f4c98b) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 406010013

NuGet
Version: 3.4.3.0

Xamarin.Profiler
Not Installed

Xamarin.Android
Version: 7.0.2.28 (Xamarin Business)
Android SDK: /Users/shayo/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)
		7.0    (API level 24)

SDK Tools Version: 25.2.2
SDK Platform Tools Version: 24.0.3
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Xamarin Android Player
Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

Apple Developer Tools
Xcode 8.0 (11246)
Build 8A218a

Xamarin.Mac
Version: 2.10.0.110 (Xamarin Business)

Xamarin.iOS
Version: 10.0.2.3 (Xamarin Business)
Hash: 26328e0
Branch: xcode8
Build date: 2016-10-14 15:27:36-0400

Build Information
Release ID: 601020038
Git revision: 8937e51ff879e4062e660a70d13463510a2664c4
Build date: 2016-10-18 16:05:22-04
Xamarin addins: 6e9e065e62ddfa1fb84effa021abc807faf8d33a
Build lane: monodevelop-lion-cycle8

Operating System
Mac OS X 10.12.1
Darwin Shays-MacBook-Pro.local 16.1.0 Darwin Kernel Version 16.1.0
    Thu Oct 13 21:26:57 PDT 2016
    root:xnu-3789.21.3~60/RELEASE_X86_64 x86_64
Comment 1 Timothy Risi 2016-10-31 19:05:44 UTC
Crashes on my iPhone 6s+ on iOS 10.1 as well.  Works on my iPhone 5s on 9.0.  Something change with iOS 10?
Comment 2 Shay 2016-10-31 19:50:24 UTC
I just stumbled across this:

https://forums.xamarin.com/discussion/77745/mediapicker-takephotoasync-crashing-on-ios10

I'll test this as soon as I can.
Comment 4 Shay 2016-10-31 21:47:17 UTC
*** Bug 45811 has been marked as a duplicate of this bug. ***
Comment 5 Shay 2016-10-31 21:48:19 UTC
Just confirmed. Adding the following to pinfo solves the problem:
<key>NSPhotoLibraryUsageDescription</key>
<string>Describe what photo library is used for</string>
<key>NSCameraUsageDescription</key>
<string>Describe what camera is used for</string>


There must have been permission changes between iOS9 and iOS10.