Crash in java.lang.ArrayIndexOutOfBoundsException: length=58; index=-4 at java.util.ArrayList.get(

RESOLVED FIXED in Firefox 56



2 years ago
2 years ago


(Reporter: calixte, Assigned: mcomella)


(Blocks 1 bug, {crash, regression})

55 Branch
Firefox 56
Dependency tree / graph

Firefox Tracking Flags

(firefox-esr52 unaffected, firefox54 unaffected, firefox55 disabled, firefox56 fixed)


(Whiteboard: [clouseau][MobileAS] 1.26, crash signature)


(1 attachment, 1 obsolete attachment)



2 years ago
This bug was filed from the Socorro interface and is 
report bp-eb9d937a-6cea-4208-aa22-e6f380170523.

There are 16 crashes in nightly 55, they started with buildid 20170330100130. In analyzing the backtrace, the regression may have been introduced by patch [1] to fix bug 1312016.
By the way since the crash signature is too accurate so the one in the summary corresponds to only one crash, but with a regex [2], we can get more.
For each signature, the length is different but the faulty index is always -4.

Flags: needinfo?(s.kaspari)
Component: General → Awesomescreen
Flags: needinfo?(s.kaspari)
Priority: -- → P2
Whiteboard: [clouseau] → [clouseau][MobileAS]
Sebastian, is this likely to be fixed in the 55 window?
Flags: needinfo?(s.kaspari)
This feature is behind Nightly flags and will not ride the trains with 55. But yeah, I should get this fixed regardless!
Flags: needinfo?(s.kaspari)
Ah, cool thanks. Once Nightly turns to 56, we'll mark 55 and unaffected and 56 as affected.

Comment 4

2 years ago
We still have 34 crashes in nightly 56.0a1 with the same signature pattern.
Rank: 1
Whiteboard: [clouseau][MobileAS] → [clouseau][MobileAS] 1.26
Assignee: nobody → michael.l.comella
Comment hidden (mozreview-request)
Iteration: --- → 1.26
Priority: P2 → P1
I think you make some good points, but I did a little more digging (even though you said it probably wasn't worth it, sorry :P)

There were reports similar to this in bug 1317631, that claimed to be fallout from a11y stuff (bug 1312434) (though at a glance I don't see how that's related).

Anyway, that fixed the issue by adding some view id checks, which also happen to swallow the -1/NO_POSITION case:

However, it doesn't really give a better explanation for why we're getting -1/NO_POSITION than what you described in the comment in this patch.

For future spelunkers, the RecyclerView OnClickListener tries to get the item clicked by calling getAdapterPosition, but it can return NO_POSITION if the view holder has any flags or isn't bound.

Comment 7

2 years ago
Comment on attachment 8888093 [details]
Bug 1367024: Fix array index out of bounds in StreamRecyclerAdapter.
Attachment #8888093 - Flags: review?(liuche) → review+

Comment 8

2 years ago
Pushed by
Fix array index out of bounds in StreamRecyclerAdapter. r=liuche

Comment 9

2 years ago
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56
Comment hidden (mozreview-request, typo)
Comment on attachment 8907829 [details]
Bug 1367024: Move NO_POSITION check for IndexOutOfBoundsException in onItemClick.

Whoops, wrong (but related) bug.
Attachment #8907829 - Attachment is obsolete: true
Attachment #8907829 - Flags: review?(michael.l.comella)
You need to log in before you can comment on or make changes to this bug.