Native crash when using SfListView with ffimageloading:CachedImage in Android

Hi,

I added images into SfListView and when scrolling many times -> crash with different application output.
This 's my code:


<sync:SfListView x:Name="ListViewItem"
                                         BackgroundColor="#eaeaea"
                                         ItemsSource="{Binding ListItem}"
                                         SelectedItem="{Binding ItemSelectedItem}"
                                         AutoFitMode="None"
                                         ItemSize="200"
                                         LoadMoreOption="Manual"
                                         LoadMoreCommand="{Binding LoadMoreItemFromCategoryCommand}"
                                         SelectionBackgroundColor="Transparent"
                                         ScrollStateChanged="ListViewItem_ScrollStateChanged"
                                         FooterSize="{Binding HeightFooterListItems}">
<sync:SfListView.LayoutManager>
</sync:SfListView.LayoutManager>
<sync:SfListView.LoadMoreTemplate>
</sync:SfListView.LoadMoreTemplate>
<sync:SfListView.ItemTemplate>
          <DataTemplate>
         <ffimageloading:CachedImage 
                                                     Grid.Column="0"
                                                     VerticalOptions="Fill"
                                                     HorizontalOptions="Fill"
                                                     Source="{Binding UrlItemImage}"
                                                     Aspect="Fill"
                                                     BackgroundColor="Transparent"
                                                     ErrorPlaceholder="ic_no_image.png"
                                                     IsVisible="{Binding VisibleItemImage}">
                                                <!--BackgroundColor="{Binding BackgroundColor}"-->
                                                <ffimageloading:CachedImage.GestureRecognizers>
                                                    <!--<TapGestureRecognizer Command="{Binding Source={x:Reference SalePage}, Path=BindingContext.OnClickImageItemCommand}"
                                                                      CommandParameter="{Binding }" />-->
                                                    <TapGestureRecognizer Command="{Binding Source={x:Reference SalePage}, Path=BindingContext.PlusQuantityCommand}"
                                                                      CommandParameter="{Binding }" />
                                                </ffimageloading:CachedImage.GestureRecognizers>
              </ffimageloading:CachedImage>
</DataTemplate>
<sync:SfListView.FooterTemplate>
</sync:SfListView.FooterTemplate>
</sync:SfListView>


There are descriptions in AppCenter:
1:
     crc644bcdcf6d99873ace.SelfDisposingBitmapDrawable.n_finalize
SelfDisposingBitmapDrawable.java, line -2
java.util.concurrent.TimeoutException: crc644bcdcf6d99873ace.FFBitmapDrawable.finalize() timed out after 10 seconds

crc644bcdcf6d99873ace.SelfDisposingBitmapDrawable.n_finalize SelfDisposingBitmapDrawable.java
crc644bcdcf6d99873ace.SelfDisposingBitmapDrawable.finalize SelfDisposingBitmapDrawable.java:85
java.lang.Daemons$FinalizerDaemon.doFinalize Daemons.java:192
java.lang.Daemons$FinalizerDaemon.run Daemons.java:175
java.lang.Thread.run Thread.java:818

2:
     crc64765b1cc0eb6a85ad.ScrollViewer.computeHorizontalScrollRange
ScrollViewer.java, line 102
Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.

Java.Lang.Error: Exception of type 'Java.Lang.Error' was thrown.
java.lang.Error: Java callstack:
crc64765b1cc0eb6a85ad.ScrollViewer.n_computeHorizontalScrollRange(Native Method)
crc64765b1cc0eb6a85ad.ScrollViewer.computeHorizontalScrollRange ScrollViewer.java:102
android.view.View.isScrollBarsVisible View.java:9632
android.view.View.access$2500 View.java:706
android.view.View$ScrollabilityCache.run View.java:21091
android.os.Handler.handleCallback Handler.java:739
android.os.Handler.dispatchMessage Handler.java:95
android.os.Looper.loop Looper.java:135
android.app.ActivityThread.main ActivityThread.java:5597
java.lang.reflect.Method.invoke(Native Method)
java.lang.reflect.Method.invoke Method.java:372
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run ZygoteInit.java:984
com.android.internal.os.ZygoteInit.main ZygoteInit.java:779

TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer)
TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType)

TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType)
Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type)
Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer)
Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer)
Object.GetObject[T] (System.IntPtr jnienv, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer)
View.n_ComputeHorizontalScrollRange (System.IntPtr jnienv, System.IntPtr native__this)


I run on KFSUWI Android 5.1.1 and SfListView 17.4.0.53, Xamarin.Forms 4.4.0.991640

1 Reply 1 reply marked as answer

LN Lakshmi Natarajan Syncfusion Team June 16, 2020 03:11 PM UTC

 
Thank you for using Syncfusion products. 
 
We have checked the reported query “Application crashes when scrolling page with many images” from our end. Based on the information provided, we are unable to reproduce the reported crash in our sample. We have tested the sample in Samsung Tablet (Android 7.1 – API 25) with Syncfusion and Xamarin.Forms mentioned version and latest version. We have attached the tested sample and video with LoadMore in the following link, 
 
 
Could  you please check the sample and let us know if you still facing the same issue? If not, please modify our sample to reproduce the reported crash and revert us back with the following details, 
  • Issue reproducing video
  • Share ListView related templates
  • Device configuration details
 
It will be helpful for us to check on it and provide you the solution as soon as possible. 
 
Regards, 
Lakshmi Natarajan 


Marked as answer
Loader.
Up arrow icon