FFImageLoading.Compat icon indicating copy to clipboard operation
FFImageLoading.Compat copied to clipboard

Support for net6

Open prostopsih opened this issue 2 years ago • 3 comments

Support for net6

prostopsih avatar May 12 '23 08:05 prostopsih

It's an excellent library, but unfortunately it's crashing when used in a NavigationPage. It's only working in shell. :(

pierrebrito avatar Jun 07 '23 03:06 pierrebrito

It's an excellent library, but unfortunately it's crashing when used in a NavigationPage. It's only working in shell. :(

Can't agree, I used it with NavigationPage and it worked as expected

prostopsih avatar Jul 17 '23 20:07 prostopsih

It's an excellent library, but unfortunately it's crashing when used in a NavigationPage. It's only working in shell. :(

Hi, I'm experiencing the same issue. When I start the app using MainPage = MyMainPage, the whole library isn't working and always crashes. When the first MainPage is run from with the Shell, then everything works.

It's very simple to reproduce, create new maui app, add the library, change mainpage.xaml and add some svg, then change in App.xaml.cs to MainPage = new MainPage(); crashes 10/10 on: Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at FFImageLoading.Maui.CachedImage.SetupOnBeforeImageLoading(TaskParameter& imageLoader, IImageSourceBinding source, IImageSourceBinding loadingPlaceholderSource, IImageSourceBinding errorPlaceholderSource) at FFImageLoading.Maui.Platform.CachedImageHandler.UpdateImage(UIImageView imageView, CachedImage image, CachedImage previousImage) at FFImageLoading.Maui.Platform.CachedImageHandler.ConnectHandler(UIImageView platformView) at Microsoft.Maui.Handlers.ViewHandler`2[[FFImageLoading.Maui.CachedImage, FFImageLoading.Compat.Maui, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null],[UIKit.UIImageView, Microsoft.iOS, Version=17.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065]].OnConnectHandler(UIView platformView) at Microsoft.Maui.Handlers.ViewHandler.OnConnectHandler(Object platformView) at Microsoft.Maui.Handlers.ElementHandler.ConnectHandler(Object platformView) at Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(IElement view)

When the same situation but in App.xaml.cs -> MainPage = new AppShell() -> the same xaml works without crashing.

Btw. this wasn't any issue in Xamarin Forms 5 and lower, we used it that way, without Shell.

Did you find a solution?

kpijnenburg77 avatar Dec 15 '23 07:12 kpijnenburg77