-
Notifications
You must be signed in to change notification settings - Fork 11
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 app when opening the camera to take a photo and displaying the crop popup and closing the popup the second time crashes #13
Comments
@ntbao17 Which version did you tested? I have tested the latest version 1.0.8 with the RGPopup.Samples on my own device. It seems work for me. Can you provide more detail about this issue, same code snips or a demo project? Thanks. |
I use version 1.0.8, I send you a demo in which there is an error when using vs popup => MauiContext should have been set on parent to use. As for using vs page, I usually only try it on iOS. Please help me see, thank you very much! |
After testing the demo project you uploaded, there are two incorrect points in your code.
Navigation.PushAsync and Navigation.PopAsync are MAUI framework's methods. They pop new page to the system navigation stack, but not to current page window. The right methods should be Navigation.PushPopupAsync and Navigation.PopPopupAsync (Or you can use PopupNavigation.Instance to replace Navigation to call PushAsync and PopAsync). And PageCropImage should extends from PopupPage but not from ContentPage. Like:
I think it may be a unsupport issue in Syncfusion.Maui.ImageEditor but not in RGPopup.Maui. After correcting the case 1 code, it works fine for me. |
In case 1, I use pagecontent to demonstrate that ImageEditor.GetImageStream() works well. |
PopupHelper.ShowPopup is not the recommend way to pop PopupPage content. As I said, it may not be supportted by MAUI framework or Syncfusion.Maui.ImageEditor. The reccomend way is to make PageCropImage inherit from PopupPage. And then just popup the PageCropImage.
|
*** Terminating app due to uncaught exception 'System.ObjectDisposedException', reason: 'Cannot access a disposed object.
Object name: 'RGPopup.Maui.IOS.Platform.PopupWindow'. (System.ObjectDisposedException)
at ObjCRuntime.ThrowHelper.ThrowObjectDisposedException(Object o) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/ThrowHelper.cs:line 52
at Foundation.NSObject.get_SuperHandle() in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:line 615
at UIKit.UIWindow.get_RootViewController() in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/dotnet/ios/generated-sources/UIKit/UIWindow.g.cs:line 385
at BigTed.ProgressHUD.RemoveHud()
at Foundation.NSActionDispatcher.Apply() in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSAction.cs:line 61
at Foundation.NSObject.InvokeOnMainThread(Action action) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:line 782
at BigTed.ProgressHUD.b__145_1()
at UIKit.UIView.<>c__DisplayClass12_0.b__0(Boolean x) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIView.cs:line 124
at ObjCRuntime.Trampolines.SDUICompletionHandler.Invoke(IntPtr block, Byte finished) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/dotnet/ios/generated-sources/ObjCRuntime/Trampolines.g.cs:line 45753
at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 58
at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 94
at ClubSync.Program.Main(String[] args) in /Users/admin/Projects/GitTea/ClubSyncMobile/Clubsync/Platforms/iOS/Program.cs:line 13
'
*** First throw call stack:
The text was updated successfully, but these errors were encountered: