Hello,
It appears that in version of Syncfusion.Xamarin.SfPopupLayout 20.2.0.38 there is a bug.
(I have been using your controls since version 17 with no issues so far.
In the app I am working on when it is minimized (OnSleep Method) a Modal is pushed to request a pin from the user.
If an SfPopup is open when it is minimized a NullReferenceException will occur on Android.
Thank you.
{System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.XForms.Android.PopupLayout.VisualContainer.Current_ModalPushed (System.Object sender, Xamarin.Forms.ModalPushedEventArgs e) [0x0008b] in <65f2bf104506461b88f5afd77e7f9c0b>:0
at Xamarin.Forms.Application.OnModalPushed (Xamarin.Forms.Page modalPage) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Application.cs:382
at Xamarin.Forms.Application+NavigationImpl.OnPushModal (Xamarin.Forms.Page modal, System.Boolean animated) [0x00143] in D:\a\1\s\Xamarin.Forms.Core\Application.cs:459
at MyApp.SessionManager.SetLockState (System.Boolean isLocked) [0x000d0] in C:\MyApp\UserInteraction\SessionManager.cs:309
at MyApp .SessionManager.Lock () [0x00055] in C:\MyApp\UserInteraction\SessionManager.cs:293
at Sal_PP_V(intptr,intptr)}
I have added a sample showing the issue.
Click on the button and then minimize the app, it will throw an exception.
If you go at the App.Xaml.cs and remove the await from the dostuff() the exception is gone.
Attachment: SfPopupIssue_60d2ac90.zip
Hi Chris,
We have fixed the reported issue “[Android] System.NullReferenceException when dismissed Popup using PushModalAsync” and included the issue fix in our latest NuGet release update version 20.3.0.48 which is available for download (https://www.nuget.org/).
We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you require any further assistance
Regards,
Suja