Crashing on re-navigating to second page.
I have a crashing issue I can't figure out. From my main page I have a button that opens a second page:
await Shell.Current.GoToAsync("newPage");
That second page is setup as a tabbed layout with 2 tabs, both tabs are content pages, one contains a grid the other contains a drawable.
On the first time, it will work fine, on the second time I get the error:
Microsoft.UI.Xaml.Controls.Frame.NavigationFailed was unhandled.
Even if I leave the Draw() method on my drawable blank so it essentials does nothing.
However, if I add a simple Thread.Sleep(500) to the constructor on the drawable, it will work fine and I can open the page over and over.
I am not sure what could be happening, for some reason on the second try (without the pause) it crashes, it seems like it is trying to clear something up but not fast enough? Is there a way to force the app to release everything on navigating back from newPage? It never c rashes on the first open, or as I stated, if I add a pause.