Closed Bug 1399042 Opened 2 years ago Closed 2 years ago
Crash in java
.lang .Index Out Of Bounds Exception: Index: -1, Size: 16 at java .util .Sub List .range Check(Abstract List .java)
59 bytes, text/x-review-board-request
This bug was filed from the Socorro interface and is report bp-cea2ebdf-1cb4-46ab-b120-d01430170911. ============================================================= There are 15 crashes in nightly 57 starting with buildid 20170902100106. :liuche, could you investigate please ?
Yes, I'm sure this is fallout from some of the newtab changes I made, so I'll take care of it.
Assignee: nobody → liuche
Iteration: --- → 1.30
Priority: -- → P1
Hm, so this is the same bug as bug 1367024, which as I look through the code, wouldn't have fixed the problem because we hit the getItemViewType first, and if the position was in fact -1, it would have hit the IllegalArgumentException rather than ArrayIndexOutOfBoundsException. I think the problem is still the same as described before (some were-state after notifyDataSetChanged is called but before there's new data), but let's land this crash fix, and investigate later if it manifests itself in the form of missing items or lost clicks.
Comment on attachment 8907832 [details] Bug 1399042: Move NO_POSITION check for IndexOutOfBoundsException in onItemClick. https://reviewboard.mozilla.org/r/179530/#review184694 I wonder if these type of events can happen if a user clicks twice before the UI updates so the first click takes the action and the second hits this error.
Attachment #8907832 - Flags: review?(michael.l.comella) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/c9b73b821bd5 Move NO_POSITION check for IndexOutOfBoundsException in onItemClick. r=mcomella
For context, I found a reference to Yigit talking about how you *do* need to check for NO_POSITION in RecyclerView: https://youtu.be/imsr8NrIAMs?t=35m45s (The code is a little different from ours because we use a RecyclerViewClickSupport which redirects all clicks to a single listener, and does the getAdapterPosition call.)
You need to log in before you can comment on or make changes to this bug.