jamesmontemagno / MediaPlugin

Take & Pick Photos and Video Plugin for Xamarin and Windows
MIT License
712 stars 359 forks source link

Error on iOS 12.2 #686

Open KennyDizi opened 5 years ago

KennyDizi commented 5 years ago

received error Native stack trace: 0 CoreFoundation 0x000000011764b6fb exceptionPreprocess + 331 1 libobjc.A.dylib 0x00000001185d1ac5 objc_exception_throw + 48 2 CoreFoundation 0x000000011764b555 +[NSException raise:format:] + 197 3 CoreFoundation 0x0000000117627070 -[NSCFDictionary setObject:forKey:] + 96 4 connect.me.mobile.iOS 0x0000000109260f59 xamarin_dyn_objc_msgSend + 217 5 ??? 0x000000013e0b13e1 0x0 + 5335880673

at ObjCRuntime.Runtime.ThrowNSException (System.IntPtr ns_exception) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.8.0.0/src/Xamarin.iOS/ObjCRuntime/Runtime.cs:411 at ObjCRuntime.Runtime.throw_ns_exception (System.IntPtr exc) [0x00000] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/runtime/Delegates.generated.cs:128 at (wrapper native-to-managed) ObjCRuntime.Runtime.throw_ns_exception(intptr) at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend_IntPtr_IntPtr(intptr,intptr,intptr,intptr) at Foundation.NSObject.SetValueForKey (Foundation.NSObject value, Foundation.NSString key) [0x0002a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.8.0.0/src/Xamarin.iOS/Foundation/NSObject.g.cs:543 at Plugin.Media.MediaPickerDelegate.SaveImageWithMetadata (UIKit.UIImage image, System.Single quality, Foundation.NSDictionary meta, System.String path) [0x0014d] in :0 --- End of stack trace from previous location where exception was thrown ---

at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend_IntPtr_IntPtr(intptr,intptr,intptr,intptr) at Foundation.NSObject.SetValueForKey (Foundation.NSObject value, Foundation.NSString key) [0x0002a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.8.0.0/src/Xamarin.iOS/Foundation/NSObject.g.cs:543 at Plugin.Media.MediaPickerDelegate.SaveImageWithMetadata (UIKit.UIImage image, System.Single quality, Foundation.NSDictionary meta, System.String path) [0x0014d] in :0 0 CoreFoundation 0x000000011764b6fb exceptionPreprocess + 331 1 libobjc.A.dylib 0x00000001185d1ac5 objc_exception_throw + 48 2 CoreFoundation 0x000000011764b555 +[NSException raise:format:] + 197 3 CoreFoundation 0x0000000117627070 -[NSCFDictionary setObject:forKey:] + 96 4 connect.me.mobile.iOS 0x0000000109260f59 xamarin_dyn_objc_msgSend + 217 5 ??? 0x000000013e0b13e1 0x0 + 5335880673

Bug Information

Version Number of Plugin: 4.2.0-beta Device Tested On: N/A Simulator Tested On: iPhone Simulator, iOS 12.2 Version of VS: 8.0.3 Version of Xamarin: Xamarin.iOS (Version: 12.8.0.0 (Visual Studio Enterprise))

jasoncouture commented 5 years ago

I'm getting this too, but no exception, just a SIGABRT, but the native stack-trace is similar.

softsan commented 5 years ago

Same issue here. i've fixed it by SaveMetaData=false of PickPhotoAsync

var file = await Plugin.Media.CrossMedia.Current.PickPhotoAsync(new Plugin.Media.Abstractions.PickMediaOptions
                      {
                          PhotoSize =  Plugin.Media.Abstractions.PhotoSize.Medium,
                    SaveMetaData=false
                      });