Xamarin.Forms.NavigationPage.GetHasNavigationBar (Xamarin.Forms.BindableObject page) Error!!

EB.3097EB.3097 USMember

My Application runs fine on Android but whenever I run it on iOS device it crashes. This happened when I'm trying to open a specific page in landscape mode as follow:

public partial class MasterDetail : MasterDetailPage
{
protected override async void OnSizeAllocated(double width, double height)
{
base.OnSizeAllocated(width, height);
if (Math.Abs(width - this.width) < double.Epsilon || Math.Abs(height - this.height) < double.Epsilon) return;
this.width = width;
this.height = height;

        if (!(width >= height) || App.MasterDetail.Detail == App.LoginPage) return;

        if (IsPresented)
        {
            IsPresented = false;
            await Task.Delay(100);
        }
        if (CustomerAccount == null) return;

        Application.Current.MainPage = App.ibringIDPage;
    } 

}

Source: "Xamarin.Forms.Core"

Message: Object reference not set to an instance of an object

StackTrace:
at Xamarin.Forms.NavigationPage.GetHasNavigationBar (Xamarin.Forms.BindableObject page) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\NavigationPage.cs:102
at Xamarin.Forms.Platform.iOS.NavigationRenderer.ViewDidLayoutSubviews () [0x0001f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:157
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/src/UIKit/UIApplication.cs:63

Please any help explaining the problem here

Sign In or Register to comment.