-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] [Android] System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index #15424
Comments
I see the same Error on my production app as well. Without a repro. |
@Seuleuzeuh Do you have any specific case? |
It might be a bit of a long shot, but does this still happen in the latest version being 5.0.0.2478? |
@jfversluis I have new tried with version |
@govi2010 you mention "The app crashes after 30+ min usage." if you just keep the app running for 30 minutes without doing anything this happens or if you just use the app like regular? Is there 1 action that you could identify that triggers this? @Seuleuzeuh do you have any information at all? Stack trace looks the same? Any indication on what actions users are taking that triggers this? |
@jfversluis 30+ mins usage means actively using it. |
Looking at this code it seems to have to do with the |
@jfversluis
Below is the structure of my
|
One thing is that it is having nested |
Hi @jfversluis thanks for looking into this issue. Here is the stacktrace :
According to my local device log, it's coming after a line deletion (with a SwipeView) in the collection (CollectionView) binded to an ObservableCollection. I'm unable de reproduce the issue, with the same material and context/datas on release or debug mode. This AppCenter log can perhaps be usefull :
I've push an update with this version 2 days ago, we need time to collect usage data (we have an average of 5 crash by month for ~= 600 users). |
@jfversluis Any workaround you can suggest? or any idea where exactly the issue is? |
@govi2010 unfortunately not at the moment yet! When did you start seeing this? When upgrading to 2401 or earlier or don't know? |
@jfversluis First instance of this Crash report was on May 25, 8:34 PM as per my App center logs. |
I guess this seems like a potential culprit then: #15236 |
@jfversluis I also was following #15236 But I was not sure if that can cause the issue. |
@jfversluis #15236 is part of |
I realize that you have mentioned that it's hard to reproduce the bug, but a PR (#15442) for this is open now, it would be awesome if you could grab the NuGet as described here and let us know if this fixes this issue. I do not recommend using this NuGet in production, so that's where this gets a bit hard I guess 😅 but if you are somehow able to test if this fixes the issue that would be great! Please let me know. Besides verifying if this particular issue is fixed also be sure to check other scenarios in the same area to make sure that this fix doesn't accidentally has side-effects 🙂 Thanks! |
@jfversluis Sorry for the late reply . . . . . I will get these changes tested by my QA and also one of my production clients later. |
@jfversluis Till now we have not gotten any crash reports on the App center in the last 10 days. I think these changes fixed our crash issue. |
Thanks for checking! Unfortunately this PR does reintroduce this initial bug. So the work is not complete on this one yet 😅 |
@jfversluis I just got app crashes again. You are right. The issue is not fixed.
|
@jfversluis any thoughts on crash? |
Still getting the crash reports on the App center. |
I also got this problem. Does anyone have any ideas? |
I am also seeing this issue |
@jared-morley and @dimonovdd Today also I got the same crash. I am totally stuck because I don't know what to do about this crash as it is not pointing me to any specific conclusion.
|
I am having similar issue, when an Emoji(not all types, but major ones) is present in a Label control inside a ViewCell my App crashes, but if I remove the Emojis using this line of code Here is the stack trace: It is happening here: |
This is really interesting because I get this type of crashes on iOS and the same as others its random, impossible to reproduce. Stacktrace: |
I found a workaround: we don't use Xamarin anymore.Forms for drawing lists, we have written our own renderers for each lists. |
@dimonovdd By change could you share the renderers? |
Still seeing this in 5.0.0.2612 |
There's a pending PR |
@Jakar510 Sorry, but these are special renderers. All list items have native layout |
I have application crash with exception (System.ArgumentOutOfRangeException Message=Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index) when emoji (🪿) is present in Label.FormattedText. |
Description
Steps to Reproduce
There are no steps. This crashes the system randomly. I have
CollectionView
on the screen which has a product list.CollectionView
is having single selection option. I never got this crash on debug environment. But Crashes on production and I got these logs from AppCenter.CollectionView
is havingReadOnlyObservableCollection
as datasource.Expected Behavior
The app should not crash.
Actual Behavior
The app crashes after 30+ min usage.
Basic Information
Xamarin.Forms version 5.0.0.2401
The text was updated successfully, but these errors were encountered: