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
Dialogs in Xamarin Forms can't RequestClose without a handler first being given to Show() [Bug] [XF] #1883
Comments
Closing as no reproduction app provided. |
Also, make sure you check for null before calling the RequestClose. This is most likely your problem. |
We'll need a repo app then |
On it |
It's going to be a little longer until I can reproduce this on a repo app. |
This issue needs to be reopened as I may have discovered the problem to it. It appears that there is an extension helper interface known as The trick is that in this particular implementation of the interface Implementation of method signature I do not want to perform a pull request as I do not have an extremely thorough understanding of all the code in this new feature yet, but hope that this will send everyone down the correct path in regards to debugging. |
@hro-it if you'd like to provide a sample that reproduces the issue I'd be happy to reopen the issue |
https://github.com/hro-it/PrismDialogIssueApp Sorry that took so long. Had some issues with Android emulation and the new Windows Sandbox interfering with one another. This problem is reproducible on both Android and iOS. The project is just setup as a .zip file for you to download, build, and run. |
@hro-it thanks for providing a sample. I'll look into this as soon as I get a moment. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Hi everyone. I've been trying out the new dialog service in 7.2.0.1367 for Xamarin Forms. I've been able to get it working but only when providing a callback handler. Otherwise I get a vague null reference exception.
This isn't explained in the release notes or the spec or PR but I think it should be. I think it should also be possible to not provide a handler and for the dialog to just dismiss.
Steps to Reproduce
dialogService.ShowDialog("MyDialog")
RequestClose(null)
.Expected Behavior
Dialog should close.
Actual Behavior
Program crashes with null reference exception. If a callback is provided, then this doesn't happen, like so:
dialogService.ShowDialog("MyDialog", CloseDialogCallback)
.Basic Information
The text was updated successfully, but these errors were encountered: