microspaze / FFImageLoading.Maui

FFImageLoading.Maui - Fast & Furious Image Loading for .NET MAUI
MIT License
97 stars 16 forks source link

App crashes on FFimage loading #43

Open sunilsolanki-alight opened 1 month ago

sunilsolanki-alight commented 1 month ago

Description

Fatal Exception: android.runtime.JavaProxyThrowable: [System.NullReferenceException]: Object reference not set to an instance of an object at FFImageLoading.Maui.CachedImage.SetupOnBeforeImageLoading() at FFImageLoading.Maui.Platform.CachedImageHandler.UpdateBitmap() at FFImageLoading.Maui.Platform.CachedImageHandler.ConnectHandler() at Microsoft.Maui.Handlers.ViewHandler`2[[FFImageLoading.Maui.CachedImage, FFImageLoading.Compat.Maui, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null],[FFImageLoading.Maui.Platform.CachedImageView, FFImageLoading.Compat.Maui, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null]].OnConnectHandler() at Microsoft.Maui.Handlers.ViewHandler.OnConnectHandler() at Microsoft.Maui.Handlers.ElementHandler.ConnectHandler() at Microsoft.Maui.Handlers.ElementHandler.SetVirtualView()

Steps to Reproduce

Loading of the image on limited network.

Expected Behavior

Either image should load / not. But app should not get crash

Actual Behavior

Basic Information

Screenshots

Reproduction Link / Code

microspaze commented 1 month ago

I tested the sample project with air-plane mode. The CacheImage controls just could not load the web images and could not reproduce your crash issue. Can you update the FFImageLoading.Maui lib to the latest version to verify it or upload a litte demo project for me to reproduce this issue?

sunilsolanki-alight commented 1 month ago

we are using the FFImageLoadingCompat.Svg.Maui Version="0.1.1". and it is latest. Do we need to update it FFImageLoading.Maui?

microspaze commented 1 month ago

@sunilsolanki-alight I think you can try to migrate FFImageLoadingCompat.Svg.Maui to FFImageLoading.Maui. The reason I created FFImageLoading.Maui is that FFImageLoadingCompat.Svg.Maui had not been update for a long time and it had some CRITICAL crash/memory related bugs. I have fixed a lot of those bugs.