Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS: SIGABRT: ArgumentNull_Generic Arg_ParamName_Name, image #4

Closed
MGohil opened this issue Jan 24, 2023 · 4 comments
Closed

iOS: SIGABRT: ArgumentNull_Generic Arg_ParamName_Name, image #4

MGohil opened this issue Jan 24, 2023 · 4 comments

Comments

@MGohil
Copy link

MGohil commented Jan 24, 2023

When we use this plugin in iOS and test the app in iPhone by giving the Captured image from Camera, it gives `SIGABRT: ArgumentNull_Generic Arg_ParamName_Name, image

Error: Value cannot be null. (Parameter 'image')

`
Device: iPhone SE (2nd generation)

Log:

ObjCRuntime.ThrowHelper.ThrowArgumentNullException(String )
ObjCRuntime.NativeObjectExtensions.GetNonNullHandle(INativeObject , String )
Bind_TOCropViewController.TOCropViewController..ctor(TOCropViewCroppingStyle style, UIImage image)
ImageCropper.Maui.PlatformImageCropper.ShowFromFile(ImageCropper imageCropper, String imageFile)
ImageCropper.Maui.ImageCropper.Show(Page page, String imageFile)
ObjCRuntime.Runtime.ThrowException(IntPtr )
UIKit.UIApplication.UIApplicationMain(Int32 , String[] , IntPtr , IntPtr )
UIKit.UIApplication.Main(String[] , Type , Type )
My.App.Program.Main(String[] args)

This is because, I get following exception in ImageCropper.Maui.ImageCropper class

2023-01-24 18:22:03.279 ImageCropperDemo[986:1175024] CapturePhotoAsync THREW: Could not find file '/private/var/containers/Bundle/Application/A81AA6BA-B507-41C9-A924-9428A9BA830B/ImageCropperDemo.app/559f1bf9-06d8-47dd-8b5d-1e5d55210757.png'.

Due to this iOS PlatformImageCropper -> ShowFromFile

UIImage image = UIImage.FromFile(imageFile);

image is null here.

@MGohil
Copy link
Author

MGohil commented Jan 24, 2023

This change will help fix this issue.

image

@MGohil
Copy link
Author

MGohil commented Jan 24, 2023

Created the Pull request: #5

@jbowmanp1107 : Can you please review and merge and release the new package version?

Thanks.

@jbowmanp1107
Copy link
Owner

I will review it today :)

jbowmanp1107 added a commit that referenced this issue Jan 25, 2023
#4 - Fixed iOS - Value cannot be null. (Parameter 'image')
@jbowmanp1107
Copy link
Owner

1.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants