Closed DeerSteak closed 5 years ago
@DeerSteak I was unable to reproduce this issue. I am able to swap pages rapidly, no freezing. Can you please take a look at the attached project and see if you experience the problem? If not, can you adjust it such that it demonstrates the behavior? Thanks!
Yes, I will do that tonight. Thanks!
@samhouts apparently I have misidentified the cause. I still have an issue with 4.0.0 that doesn't exist in 3.6.0 but it's not setting the main page. I'll continue to work on isolating it. Canceling this for now. Sorry for the trouble.
Was able to trace it down to a NuGet package, and created a ticket with a sample app for that project. It only happened on Forms 4.0, but it required an update for that project instead. not Forms. My apologies.
I'm also facing this exact issue, but cannot pin point a specific nugget package to be the problem. @DeerSteak, what package caused this problem for you?
edit: This happens on Xamarin.forms 4.1.0.618606
@sha256x for me it was Plugin.SegmentedControl.Netstandard. I reported the bug and created a sample for the project maintainers and they fixed it in like 2 days. So if you have the latest version of that, it shouldn't be the cause.
@DeerSteak, I don't have that installed :/ I still get the crash.
Was LiveXAML for us
I also had to fix it on some custom controls I wrote myself. Basically the page disappearing causes the control to fire OnElementChanged(), and apparently it never used to do that. I had to go through my custom controls and set anything that referenced a native control in the iOS and Android projects to include null checks for this.Control
everywhere.
Description
When changing Application.Current.MainPage on iOS using a button event on another page, the screen goes white and never displays the new page. The app does not crash, it just freezes. This previously happened in #4156 on Forms 3.3 and 3.4, but was fixed in 3.5 and 3.6.
Steps to Reproduce
var myApp = (App)Xamarin.Forms.Application.Current; myApp.MainPage = new MainPage();
Run the iOS app, click the button 'Click Me'. Wait for few seconds and it will freeze.
Expected Behavior
That the SecondPage would be displayed
Actual Behavior
App freezes on iOS
Basic Information
Screenshots
Reproduction Link