Open Sevenish opened 6 years ago
Is there any information about when this will be fixed?
This issue doesn't seem to have had any activity in a long time. We're working on prioritizing issues and resolving them as quickly as we can. To help us get through the list, we would appreciate an update from you to let us know if this is still affecting you on the latest version of Xamarin.Forms, since it's possible that we may have resolved this as part of another related or duplicate issue. If we don't see any new activity on this issue in the next 30 days, we'll evaluate whether this issue should be closed. Thank you!
This issue has NOT been resolved. The work around is still required
@Sevenish Thank you for confirming it!
We're getting a crash in UWP as well which may be related.
We were informed of a NullReference exception but it wasn't clear where it was. I dug into the UAP.FormsPresenter in the SizeChanged handler but the only thing I could see there is that the crash could happen if the RealParent was null, however Visual Studio did not show any RealParent to be null on any page object I was looking at. https://github.com/xamarin/Xamarin.Forms/blob/80a4dbfb1cd897f478c38d0aafa6a5d67940d2f3/Xamarin.Forms.Platform.UAP/FormsPresenter.cs
We are doing NavigationPage.PushAsync(page, animated) and the crash started since we updated to Xamarin.Forms 5.0.0.2012. My work around is similar to the work around mentioned above in that before I call PushAsync I assign Xamarin.Forms.Application.Current to the Parent property of my Detail page.
It is still an issue.
Use case forms embedding, with application level staticresources:
In this case the existing current XF application gets overridden with an empty one at https://github.com/xamarin/Xamarin.Forms/blob/4c8f901e2333ac1baae818ead61c93559f39758d/Xamarin.Forms.Platform.iOS/PageExtensions.cs#L15
Normally the RealParent would be set when assiging main page. But with embedding this is not used. The code should check wether there is a current XF application before overwriting it.
A workaround until this is fixed is setting the parent manually