#2440·flash-list

ViewHolderCollection.render 在渲染栈超出了布局表时会抛出"索引越界,布局不足"的异常

作者: hoangzinh创建于 2026年8月13日更新于 2026年8月13日
标签bug

ViewHolderCollection can throw index out of bounds, not enough layouts while rendering, taking down the tree. It happens when the render stack (RenderStackManager.keyMap) still holds an entry whose index was removed from the layout table (LayoutManager.layouts): the render path reads layouts through an unguarded getLayout(index), which throws instead of returning undefined.

Same error and same getLayout family as #2291, different call site — that one is the validateItemSize measurement callback, this one is the render path.

内容来源: Shopify/flash-list