Closed
Bug 1262600
Opened 9 years ago
Closed 9 years ago
crash in java.lang.IndexOutOfBoundsException: Invalid index -1, size is 13 at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java)
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox48 verified, fennec48+)
RESOLVED
FIXED
Firefox 48
People
(Reporter: TeoVermesan, Assigned: liuche)
References
Details
(Keywords: crash)
Crash Data
Attachments
(1 file)
This bug was filed from the Socorro interface and is
report bp-297d9256-a905-41df-ade3-ee3762160406.
=============================================================
Steps to reproduce:
1. Perform sync
2. Go to the History panel
3. Hide 2 or 3 devices
4. Unhide them
Actual results:
- Firefox crashes
Expected results:
- Hidden devices should be displayed
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → liuche
Blocks: home-panels
Updated•9 years ago
|
tracking-fennec: --- → ?
Updated•9 years ago
|
tracking-fennec: ? → 48+
Assignee | ||
Comment 1•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/45141/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/45141/
Attachment #8739237 -
Flags: review?(s.kaspari)
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 2•9 years ago
|
||
To clarify: I reverted the change I made to create getHiddenItemsIndex because the hidden item is not always present and depends on state around "were items been removed" or "are there any hidden items left" so I think it's better to handle that locally, rather than have a method.
Updated•9 years ago
|
Attachment #8739237 -
Flags: review?(s.kaspari)
Comment 3•9 years ago
|
||
Comment on attachment 8739237 [details]
MozReview Request: Bug 1262600 - crash in java.lang.IndexOutOfBoundsException: Invalid index -1, size is 13 at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java). r=sebastian
https://reviewboard.mozilla.org/r/45141/#review41681
I don't understand the difference: This should still use an index of -1 if the list is empty or am I missing something?
Assignee | ||
Comment 4•9 years ago
|
||
Actually we should never be returning -1 because the value is used as a list index, so I just removed the method. The method returned -1 if hiddenClients was empty, which I realized is exactly the wrong assumption because we're calling it in the case where the UI is *not* consistent with the state of hiddenClients because we want to update it to be consistent!
Basically, we're finding the index of the (no longer needed) "N devices hidden" list item so we can call notifyItemRemoved. It's not really possible to tell whether the "N devices hidden" list item is actually present based on the state of data structures, so it's better to leave the logic in place because then it's more clear that when we're using the "size() - 1" call, the size is never 0.
Assignee | ||
Updated•9 years ago
|
Attachment #8739237 -
Flags: review?(s.kaspari)
Comment 5•9 years ago
|
||
Comment on attachment 8739237 [details]
MozReview Request: Bug 1262600 - crash in java.lang.IndexOutOfBoundsException: Invalid index -1, size is 13 at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java). r=sebastian
https://reviewboard.mozilla.org/r/45141/#review41873
Ah, now I get it. I didn't see that the method was using hiddenClients and your new code is using remoteClients.
Attachment #8739237 -
Flags: review?(s.kaspari) → review+
Comment 7•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 48
Verified as fixed on the 48.0b1 build. This issue was tested on a Nexus 6P (Android 7.0), ZTE Grand X (Android 4.0.4) and on a Sony Xperia Z2 (Android 5.0.2)
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•