-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressiona: error messageError messages from the Flutter frameworkError messages from the Flutter frameworkf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.16Found to occur in 3.16Found to occur in 3.16found in release: 3.17Found to occur in 3.17Found to occur in 3.17frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
In the app I'm working on, we have a custom SliverGrid layout. It does a somewhat sparse layout of grid items, with a contiguous series of items and other items interspersed along the way. Some actions performed in the app causes the grid contents to be limited - thus items are removed from the grid.
We also use a findChildIndexCallback with SliverChildBuilderDelegate. It seems like that combination can lead to places in the grid where removing items leads to a crash.
- Open https://dartpad.dev/?id=d9f723468f22d4035dfcf90366802151
- Run app
- Scroll down until "grid item 7" just scrolls into view in the left column
- Press the FAB/refresh button in the bottom right
Expected results
No crashes or issues.
Actual results
══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
The following assertion was thrown during performLayout():
Assertion failed:
file:///opt/flutter/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart:508:12
childCount >= leadingGarbage + trailingGarbage
is not true
Widget creation tracking is currently disabled. Enabling it enables improved error messages. It can
be enabled by passing `--track-widget-creation` to `flutter run` or `flutter test`.
When the exception was thrown, this was the stack
The following RenderObject was being processed when the exception was fired: RenderSliverGrid#255ad relayoutBoundary=up1 NEEDS-LAYOUT NEEDS-COMPOSITING-BITS-UPDATE:
needs compositing
creator: SliverGrid ← Viewport ← IgnorePointer-[GlobalKey#e6cb3] ← Semantics ← Listener ←
_GestureSemantics ← RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#04dfe] ←
Listener ← _ScrollableScope ← _ScrollSemantics-[GlobalKey#8e450] ←
NotificationListener<ScrollMetricsNotification> ← RepaintBoundary ← ⋯
parentData: paintOffset=Offset(0.0, 0.0) (can use size)
constraints: SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle,
scrollOffset: 6878.2, remainingPaintExtent: 805.0, crossAxisExtent: 826.0, crossAxisDirection:
AxisDirection.right, viewportMainAxisExtent: 805.0, remainingCacheExtent: 1305.0, cacheOrigin:
-250.0)
geometry: SliverGeometry(scrollExtent: 21000.0, paintExtent: 805.0, maxPaintExtent: 21000.0,
hasVisualOverflow: true, cacheExtent: 1305.0)
currently live children: 1 to 6
This RenderObject had the following descendants (showing up to depth 5):
child with index 1: RenderIndexedSemantics#9f23a
child: RenderRepaintBoundary#89623 NEEDS-PAINT
child: _RenderColoredBox#da96c NEEDS-PAINT
child: RenderPositionedBox#60e7f NEEDS-LAYOUT
child: RenderParagraph#3e200 relayoutBoundary=up1 NEEDS-LAYOUT
child with index 2: RenderIndexedSemantics#cd9d3
child: RenderRepaintBoundary#04b11 NEEDS-PAINT
child: _RenderColoredBox#d3dc9 NEEDS-PAINT
child: RenderPositionedBox#d0f81 NEEDS-LAYOUT
child: RenderParagraph#6065a relayoutBoundary=up1 NEEDS-LAYOUT
child with index 5: RenderIndexedSemantics#5f68d NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
child: RenderRepaintBoundary#ed0b9 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
child: _RenderColoredBox#b737d NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
child: RenderPositionedBox#2daac NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
child: RenderParagraph#26a3e NEEDS-LAYOUT NEEDS-PAINT
child with index 6: RenderIndexedSemantics#4b2f1 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
child: RenderRepaintBoundary#93339 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
child: _RenderColoredBox#10147 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
child: RenderPositionedBox#a9025 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
child: RenderParagraph#23002 NEEDS-LAYOUT NEEDS-PAINT
════════════════════════════════════════════════════════════════════════════════════════════════════
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
[Paste your output here]Metadata
Metadata
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressiona: error messageError messages from the Flutter frameworkError messages from the Flutter frameworkf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.16Found to occur in 3.16Found to occur in 3.16found in release: 3.17Found to occur in 3.17Found to occur in 3.17frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team