maui
maui copied to clipboard
Unhandled Win32 Exception when Calling Shell.GoToAsync(..) during a load of a page
Description:
An unhandled win32 exception appears when calling Shell.Current.GoToAsync("//PageName");
before Shell PageView finishes loading. Calling after the page is loaded (ie. using an callback after page loads) executes as expected without any issues.
Edit: Added repro repo: https://github.com/GasimoDoesCode/MauiIssueRepro
Discussed in https://github.com/dotnet/maui/discussions/8462
Originally posted by mehmetilker July 1, 2022 Sometimes I am seeing following exception and neither can see details or catch the exception in code.
Sometimes it happend when I close the app. For example what I am doing a rediction to xaml page from razor page with following way:
async void GoToCategory()
{
try
{
await Shell.Current.GoToAsync("//category/world?CategoryId=world",
new Dictionary<string, object>
{
["bear"] = "aaa"
});
}
catch(Exception ex)
{
Debug.WriteLine(ex.ToString());
}
}
Is there a way to see details of this kind of exceptions?
Try to push latest changes to github, then pull the project to another folder and run in debug.
Try to push latest changes to github, then pull the project to another folder and run in debug.
Hi @8m0, this unhandled win32 exception appears even in a brand new MAUI Sample project (Appearing on MAUI 6 using VS 17.4.2 and 17.5) which is not linked to any git repo.
Hi @GasimoDoesCode. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Added repro repo: https://github.com/GasimoDoesCode/MauiIssueRepro
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
Verified this on Visual Studio Enterprise 17.7.0 Preview 1.0. Repro on Windows 11 with below Project: MauiIssueRepro.zip
This is still an issue on Windows but it doesn't always happen. Looks like a race condition under the hood somewhere.
Hey team, any idea how we could trap these unhandled win32 exceptions so the impact can be measured in production with tools like Sentry.io etc.
This issue still exists in MAUI 8.0.40