dotnet / dotnet/maui-samples

Fundamentals Shell Sample Exception on iOS Launch

Open
#259 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
3.7k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

As soon as the "Fundamentals" Shell app is deployed on to the iPhone simulator it crashes with a:

ex {System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Maui.ImageSourceExtensions.GetPlatformImageAsync(IImageSource imageSource, IMauiContext mauiContext) at Microsoft.Maui.ImageSourceExtensions.LoadImage(IImag…}

StackTrace " at Microsoft.Maui.ImageSourceExtensions.GetPlatformImageAsync(IImageSource imageSource, IMauiContext mauiContext)\n at Microsoft.Maui.ImageSourceExtensions.LoadImage(IImageSource source, IMauiContext mauiContext, Action`1 finished)\n at Microsoft.Maui.Con…"

at Microsoft.Maui.ImageSourceExtensions.GetPlatformImageAsync(IImageSource imageSource, IMauiContext mauiContext)
at Microsoft.Maui.ImageSourceExtensions.LoadImage(IImageSource source, IMauiContext mauiContext, Action`1 finished)
at Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutContentRenderer.UpdateFlyoutBgImageAsync()
at Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutContentRenderer.UpdateBackground()
at Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutContentRenderer.ViewDidLoad()
at UIKit.UIViewController.get_View()
at Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutRenderer.ViewDidLoad()
at UIKit.UIViewController.get_View()
at Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutRenderer.Microsoft.Maui.Controls.Platform.Compatibility.IShellFlyoutRenderer.get_View()
at Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer.get_NativeView()
at Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer.Microsoft.Maui.IElementHandler.get_PlatformView()
at Microsoft.Maui.Handlers.ViewHandler.MapInputTransparent(IViewHandler handler, IView view)
at Microsoft.Maui.PropertyMapper`2.<>c__DisplayClass5_0[[Microsoft.Maui.IView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.IViewHandler, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].b__0(IElementHandler h, IElement v)
at Microsoft.Maui.PropertyMapper.UpdatePropertyCore(String key, IElementHandler viewHandler, IElement virtualView)
at Microsoft.Maui.PropertyMapper.UpdateProperty(IElementHandler viewHandler, IElement virtualView, String property)
at Microsoft.Maui.PropertyMapper`2.<>c__DisplayClass5_0[[Microsoft.Maui.Controls.Layout, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Handlers.LayoutHandler, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].b__0(IElementHandler h, IElement v)
at Microsoft.Maui.PropertyMapper.UpdatePropertyCore(String key, IElementHandler viewHandler, IElement virtualView)
at Microsoft.Maui.PropertyMapper.UpdateProperties(IElementHandler viewHandler, IElement virtualView)
at Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer.SetElement(VisualElement element)
at Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer.Microsoft.Maui.IElementHandler.SetVirtualView(IElement view)
at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler)
at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value)
at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.set_Handler(IElementHandler value)
at Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context)
at Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context)
at Microsoft.Maui.Platform.ElementExtensions.ToUIViewController(IElement view, IMauiContext context)
at Microsoft.Maui.Handlers.WindowHandler.MapContent(IWindowHandler handler, IWindow window)
at Microsoft.Maui.PropertyMapper`2.<>c__DisplayClass5_0[[Microsoft.Maui.IWindow, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Handlers.IWindowHandler, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].b__0(IElementHandler h, IElement v)
at Microsoft.Maui.PropertyMapper.UpdatePropertyCore(String key, IElementHandler viewHandler, IElement virtualView)
at Microsoft.Maui.PropertyMapper.UpdateProperties(IElementHandler viewHandler, IElement virtualView)
at Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(IElement view)
at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler)
at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value)
at Microsoft.Maui.Platform.ElementExtensions.SetHandler(INativeObject nativeElement, IElement element, IMauiContext context)
at Microsoft.Maui.Platform.ElementExtensions.SetWindowHandler(UIWindow platformWindow, IWindow window, IMauiContext context)
at Microsoft.Maui.Platform.ApplicationExtensions.CreatePlatformWindow(IApplication application, UIWindowScene windowScene, NSDictionary[] states)
at Microsoft.Maui.Platform.ApplicationExtensions.CreatePlatformWindow(IUIApplicationDelegate platformApplication, IApplication application, UIApplication uiApplication, NSDictionary launchOptions)
at Microsoft.Maui.MauiUIApplicationDelegate.FinishedLaunching(UIApplication application, NSDictionary launchOptions)
at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass)
at Xaminals.Program.Main(String[] args) in /Users/sdsdf/Documents/GitHub/maui-samples/6.0/Fundamentals/Shell/Xaminals/Platforms/iOS/Program.cs:line 15

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.