- Home
- Forum
- Xamarin.Forms
- SfListView Crashes When Collapsing First Group - v27.1.48
SfListView Crashes When Collapsing First Group - v27.1.48
I am using an SfListView with grouping and sorting via a DataSource and my application is crashing every time I collapse, expand, then collapse the first group. The error i am receiving a System.ArgumentOutOfRangeException with the following message:
-1 out of range 0 to 0
Parameter name: index
StackTrace: " at Syncfusion.GridCommon.ScrollAxis.DistanceRangeCounterCollection.CheckRange (System.String paramName, System.Int32 from, System.Int32 to, System.Int32 actualValue) [0x00044] in <d608f04bf13d4bd1a2ebce2d5e4bbfa8>:0 \n at Syncfusion.GridCommon.ScrollAxis.Dis…"
I have tried to repetitively open and close the second group and I haven't gotten the same error but on the first group, all it takes is a collapse, an expand, and then it crashes on the second collapse. I have tried to change the ItemSize, GroupHeaderSize, AutoFitMode, ItemTemplate, and GroupHeaderTemplate but nothing seems to prevent the error from happening.
Steps to reproduce:
- Create a SfListView with AllowGroupExpandCollapse = true
- Create a grouped DataSource
- Bind the SfListView.DataSource to the DataSource and bind the SfListView.ItemSource to the DataSource.Source
- Set ItemTemplate and GroupHeaderTemplate
- Collapse first group, expand first group, then collapse first group without expanding or collapsing any other groups.
Hi Bryson Scales,
We’ve created a sample as per your instructions and followed the steps you mentioned to replicate the issue and additionally, we tried to replicate the issue by adding/removing the items on-demand, but unfortunately, we were unable to reproduce the issue on our end. We've attached the sample for your reference. We request you to run it and confirm if the issue occurs. If you continue to experience the problem, kindly share a reproducible sample, the specific platform where the issue appears, and the Xamarin version you're using. This information will help us investigate further.
Regards,
Anees Fathima.
Attachment: ExpandCollapse_(2)_f5eff046.zip
My apologies, I was using a test data set throughout my application and the crash was being caused due to too many references to the DataSource.
Hi Bryson Scales,
Could you please provide additional details to help us reproduce the issue on our end? Specifically, we’d like to know the platform where the issue occurs, the Xamarin version you're using, and whether you are using the group collapsed or expanded events. Additionally, if there are any scroll-based actions implemented within these events, please let us know. If possible, could you also share a reproducible sample of the issue? This information will assist us in investigating the problem more effectively.
Regards,
Anees Fathima.
- 3 Replies
- 2 Participants
- Marked answer
-
BS Bryson Scales
- Nov 7, 2024 07:33 PM UTC
- Nov 11, 2024 12:50 PM UTC