RowList wraps to the opposite end of a row when a held scroll is released in the frame it reaches that end

Device: Roku Ultra 4800RW, OS 16.0.4 build 834, 1080p (FHD channel)
Component: RowList, rowFocusAnimationStyle: “fixedFocus”
Severity: High. Focus jumps to the far end of the row, which looks to the user like the row scrolled away from under them.

Summary

If a held LEFT or RIGHT is released in the same frame that the row’s scroll arrives at its first or last item, RowList moves one more item past the end. Rows in this style don’t wrap, so the extra step goes past the end and RowList wraps around to the opposite end of the row:

  • RIGHT: currFocusColumn animates from the last index towards last + 1 (e.g. 7.0 → 7.99), then becomes 0. rowItemFocused reports [row, 0].
  • LEFT: at release currFocusColumn is 0. It then jumps to just under last + 1 (e.g. 7.85) and animates down to the last index. rowItemFocused reports [row, last].

Steps to reproduce

  1. Create a Scene containing a RowList with two rows: row 0 with 4 items and row 1 with 8 items. Set rowFocusAnimationStyle: “fixedFocus”, vertFocusAnimationStyle: “fixedFocus”, itemSize: [1749, 330], rowItemSize: [[398, 330]], rowItemSpacing: [[24, 0]], numRows: 3, and give it focus. drawFocusFeedback doesn’t matter; it reproduced with both values.
  2. Observe currFocusColumn and rowItemFocused, printing every change.
  3. Press DOWN to focus row 1, column 0.
  4. Hold RIGHT and release it just as the row reaches item 7. Over ECP, run keydown/Right, wait about 2.45 seconds, then run keyup/Right. The exact delay depends on the device’s scroll timing, so scan delays around the moment the row arrives at the last item.

Expected

Focus stays on [1,7], the last item.

Actual

currFocusColumn continues past 7 (7.09 … 7.99), then becomes 0, and rowItemFocused reports [1,0]. The row visibly scrolls back to its start. Excerpt of a trace (ms timestamps):
cfc t=4280 6.99763
key t=4297 right press=false
cfc t=4298 7
cfc t=4314 7.09242
…
cfc t=4630 7.99763
cfc t=4647 0
rowItemFocused [1,0]
The LEFT case mirrors this: hold LEFT from the last item and release as the row reaches item 0. Focus ends on the last item.

Frequency

It needs the release to land within roughly one frame of the arrival:

  • Across 400 trials with hold lengths spread over 1.6–3.0 seconds, all 5 failures had a hold length of 2.45–2.47 seconds.
  • With holds limited to that window, it failed in 6 of 40 trials on a newly created RowList, and 11 of 40 on one already scrolled to its end before. So the row being new doesn’t matter.
  • In real use it shows up when a user holds a key and lets go as the row reaches its end.

Notes

currFocusColumn is greater than the last index only in this case, which a row that doesn’t wrap should never reach. Apps can detect that and write jumpToRowItem back to the end the user was heading for. That workaround reduced the failures to 0 of 220 trials in our app. After that jump, RowList first reports the wrapped item (inline or a few frames later) before reporting the target.

Thanks for the report.

We are likely not doing any major changes to RSG’s RowList anytime soon, as we have replacements coming in the new RSG SDK that are implemented in TypeScript as part of the FlexGrid control, while changes to the RowList require firmware changes and also dealing with possible regressions in BrightScript apps that already have workarounds.

To improve the chances of us working on a bug, it’s best to include a reproduction app as an attachment to your report.

Roku is a $23 billion company. I’m an independent developer working on my own, yet I’ve taken the time to identify a bug in your component, investigate it thoroughly, run hundreds of trials, document the behaviour in detail, provide reproducible steps and even develop and verify a workaround.

With respect, it’s not my job to test Roku’s components for Roku. I’ve already gone considerably further than simply reporting that something doesn’t work, providing detailed technical evidence that demonstrates exactly what is happening, under what circumstances it happens and how it can be worked around.

Now I’m being told that, to improve the chances of Roku even considering fixing the issue, I should also develop a separate reproduction app. That’s taking the piss, frankly. The fact that your engineering team would find a reproduction app more convenient doesn’t make producing one my responsibility.

I’ve uploaded a couple of example apps for some of the bugs, but those were apps I already had available and could share. My employer isn’t paying me to spend additional time developing applications specifically to help Roku investigate its own components, nor should that be an expectation.

I understand that changes to RowList carry regression risks and that Roku has other controls in development. That’s a reasonable explanation for why a fix might not be prioritised, although, frankly, that also feels a bit like a cop-out because any mitigations that anyone has put in place will be triggered by the buggy behaviour, so once that’s removed, those mitigations would simply stop being execited. However, asking the person reporting a thoroughly investigated bug to do yet more of your engineering team’s work is not.

I’ve provided enough information to demonstrate the defect clearly and give an experienced engineer a solid starting point for investigating it. If Roku needs additional information to reproduce it, I’m happy to answer specific technical questions. But I’m not going to spend further development time building and maintaining a standalone test application for a multi-billion-dollar company’s benefit.

What’s next? Am I expected to fix the bug in your source code as well?

Come on, guys. Take some ownership and get some work done.

1-edge-release-wraps-row.zip (8.5 KB)