question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ListView] Sticky header index 0 was outside the range {0, 0}

See original GitHub issue

I sometimes get the following redbox:

Sticky header index 0 was outside the range {0, 0}

Debugging brought me to ScrollView.m to the following line:

    if (idx >= subviewCount) {
      RCTLogError(@"Sticky header index %zd was outside the range {0, %zd}", idx, subviewCount);
      return;
    }

For me it helped to change it to

if (idx > subviewCount) {

Although I havent tried to understand the entire function up to now, the error message “Sticky header index %zd was outside the range {0, %zd}” seems to suggest that it has to be “>” instead of “>=”, at least for my case where idx is 0 and subviewCount is 0 as well.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
alexprice1commented, Mar 29, 2016

For me it is the DatePickerIOS which is causing this issue. I kind of hate DatePickerIOS right now.

5reactions
idecommented, Jul 31, 2015

Sometimes if renderRow (or the other render methods) throw an error, you end up getting a native error about the sticky headers instead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sticky Component inside scrollview - react native
It is very simple with ScrollView component. There is already something called "stickyHeaderIndices" which takes the index of child to make ...
Read more >
ListView - Android Developers
A class that represents a fixed view in a list, for example a header at the top or a ... android:alpha, alpha property...
Read more >
sticky_headers | Flutter Package - Pub.dev
Flutter Sticky Headers - Lets you place headers on scrollable content that will stick to the top of the container whilst the content...
Read more >
Element: <oj-data-grid> - Oracle
If in the column end header, move focus to upside in a contiguous data range including the level 0 of the active index...
Read more >
ListView.cs - Reference Source - Microsoft
CreateKey(); private int updateCounter = 0; // the counter we use to track how many ... This includes the column header when item...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found