Comments (13)
Set addAutomaticKeepAlives: false
Can solve the problem.
from flutter_staggered_grid_view.
Any updates???
from flutter_staggered_grid_view.
same problem
from flutter_staggered_grid_view.
Same problem.
from flutter_staggered_grid_view.
It usually happens when I scroll up pretty fast. Tried adding
if(child == null) { return; }
before parentData was accessed on the offending line. Another error is thrown in that case.
A RenderObject was still attached when attempting to deactivate its RenderObjectElement:
I/flutter ( 6385): RenderIndexedSemantics#06c33
I/flutter ( 6385): 'package:flutter/src/widgets/framework.dart':
I/flutter ( 6385): Failed assertion: line 4920 pos 12: '!renderObject.attached'
I/flutter ( 6385):
I/flutter ( 6385): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter ( 6385): more information in this error message to help you determine and fix the underlying cause.
I/flutter ( 6385): In either case, please report this assertion by filing a bug on GitHub:
I/flutter ( 6385): https://github.com/flutter/flutter/issues/new?template=BUG.md
I/flutter ( 6385):
I/flutter ( 6385): When the exception was thrown, this was the stack:
I/flutter ( 6385): #2 RenderObjectElement.deactivate (package:flutter/src/widgets/framework.dart:4920:12)
I/flutter ( 6385): #3 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1755:13)
I/flutter ( 6385): #4 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3955:14)
I/flutter ( 6385): #5 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1757:13)
I/flutter ( 6385): #6 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3955:14)
I/flutter ( 6385): #7 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1757:13)
I/flutter ( 6385): #8 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3955:14)
I/flutter ( 6385): #9 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1757:13)
I/flutter ( 6385): #10 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3955:14)
I/flutter ( 6385): #11 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1757:13)
I/flutter ( 6385): #12 _InactiveElements.add (package:flutter/src/widgets/framework.dart:1766:7)
I/flutter ( 6385): #13 Element.deactivateChild (package:flutter/src/widgets/framework.dart:3120:29)
I/flutter ( 6385): #14 Element.updateChild (package:flutter/src/widgets/framework.dart:2864:9)
I/flutter ( 6385): #15 SliverVariableSizeBoxAdaptorElement.updateChild (package:flutter_staggered_grid_view/src/widgets/sliver.dart:170:36)
I/flutter ( 6385): #16 SliverVariableSizeBoxAdaptorElement.removeChild.<anonymous closure> (package:flutter_staggered_grid_view/src/widgets/sliver.dart:201:32)
I/flutter ( 6385): #17 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2320:19)
I/flutter ( 6385): #18 SliverVariableSizeBoxAdaptorElement.removeChild (package:flutter_staggered_grid_view/src/widgets/sliver.dart:197:11)
I/flutter ( 6385): #19 List.forEach (dart:core-patch/growable_array.dart:278:8)
I/flutter ( 6385): #20 RenderSliverVariableSizeBoxAdaptor.collectGarbage.<anonymous closure> (package:flutter_staggered_grid_view/src/rendering/sliver_variable_size_box_adaptor.dart:345:12)
I/flutter ( 6385): #21 RenderObject.invokeLayoutCallback.<anonymous closure> (package:flutter/src/rendering/object.dart:1715:58)
I/flutter ( 6385): #22 PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:796:15)
I/flutter ( 6385): #23 RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:1715:13)
I/flutter ( 6385): #24 RenderSliverVariableSizeBoxAdaptor.collectGarbage (package:flutter_staggered_grid_view/src/rendering/sliver_variable_size_box_adaptor.dart:331:5)
I/flutter ( 6385): #25 RenderSliverStaggeredGrid.performLayout (package:flutter_staggered_grid_view/src/rendering/sliver_staggered_grid.dart:364:5)
I/flutter ( 6385): #26 RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter ( 6385): #27 RenderSliverPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:181:11)
I/flutter ( 6385): #28 RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter ( 6385): #29 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:406:13)
I/flutter ( 6385): #30 RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1334:12)
I/flutter ( 6385): #31 RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1252:20)
I/flutter ( 6385): #32 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1496:7)
I/flutter ( 6385): #33 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:765:18)
I/flutter ( 6385): #34 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:346:19)
I/flutter ( 6385): #35 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:701:13)
I/flutter ( 6385): #36 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:285:5)
I/flutter ( 6385): #37 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1016:15)
I/flutter ( 6385): #38 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:958:9)
I/flutter ( 6385): #39 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:874:5)
I/flutter ( 6385): #43 _invoke (dart:ui/hooks.dart:236:10)
I/flutter ( 6385): #44 _drawFrame (dart:ui/hooks.dart:194:3)
I/flutter ( 6385): (elided 5 frames from class _AssertionError and package dart:async)
I/flutter ( 6385):
I/flutter ( 6385): The following RenderObject was being processed when the exception was fired: RenderSliverStaggeredGrid#a47e8
relayoutBoundary=up2 NEEDS-LAYOUT NEEDS-COMPOSITING-BITS-UPDATE:
I/flutter ( 6385): needs compositing
I/flutter ( 6385): creator: SliverStaggeredGrid ← StreamBuilder<int> ← NewsGrid ← SliverPadding ← Viewport ←
I/flutter ( 6385): IgnorePointer-[GlobalKey#d25fb] ← Semantics ← Listener ← _GestureSemantics ←
I/flutter ( 6385): RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#04ed4] ← Listener ← _ScrollableScope
I/flutter ( 6385): ← ⋯
I/flutter ( 6385): parentData: paintOffset=Offset(8.0, 0.0) (can use size)
I/flutter ( 6385): constraints: SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.forward,
I/flutter ( 6385): scrollOffset: 929.3, remainingPaintExtent: 627.4, crossAxisExtent: 395.4, crossAxisDirection:
I/flutter ( 6385): AxisDirection.right, viewportMainAxisExtent: 627.4, remainingCacheExtent: 1127.4 cacheOrigin:
I/flutter ( 6385): -242.0 )
I/flutter ( 6385): geometry: SliverGeometry(scrollExtent: 8301.8, paintExtent: 627.4, maxPaintExtent: 8301.8,
I/flutter ( 6385): hasVisualOverflow: true, cacheExtent: 1127.4)
I/flutter ( 6385): currently live children: 4,5,6,7,8,9,10,11
I/flutter ( 6385): This RenderObject had the following descendants (showing up to depth 5):
I/flutter ( 6385): child with index 4: RenderIndexedSemantics#5c030
I/flutter ( 6385): child: RenderRepaintBoundary#cae53 NEEDS-LAYOUT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6385): child: RenderSemanticsAnnotations#f5fb9 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6385): child: RenderPadding#6bacb NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6385): child: RenderPhysicalShape#45314 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6385): child with index 5: RenderIndexedSemantics#6788f
I/flutter ( 6385): child: RenderRepaintBoundary#64389 NEEDS-LAYOUT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6385): child: RenderSemanticsAnnotations#798c6 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6385): child: RenderPadding#cf1ed NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6385): child: RenderPhysicalShape#f19f7 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6385): child with index 6: RenderIndexedSemantics#cbbc0
I/flutter ( 6385): child: RenderRepaintBoundary#7110e NEEDS-LAYOUT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6385): child: RenderSemanticsAnnotations#fd263 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6385): child: RenderPadding#8db04 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6385): child: RenderPhysicalShape#a0b5a NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6385): child with index 7: RenderIndexedSemantics#215e0
I/flutter ( 6385): child: RenderRepaintBoundary#59afa
I/flutter ( 6385): child: RenderSemanticsAnnotations#ac8bb NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6385): child: RenderPadding#8208c NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6385): child: RenderPhysicalShape#ccba5 NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6385): child with index 8: RenderIndexedSemantics#8eb56
I/flutter ( 6385): child: RenderRepaintBoundary#85323 NEEDS-PAINT
I/flutter ( 6385): child: RenderSemanticsAnnotations#ef5eb NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6385): child: RenderPadding#ee668 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6385): child: RenderPhysicalShape#8046d NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6385): ...(descendants list truncated after 25 lines)
from flutter_staggered_grid_view.
Has anyone found any fixes/workarounds for this.
from flutter_staggered_grid_view.
Same problem, any update?
from flutter_staggered_grid_view.
how to deal?
from flutter_staggered_grid_view.
Set addAutomaticKeepAlives: false
Can solve the problem.
but i want to set this property as true,how do?
from flutter_staggered_grid_view.
Im also getting this error, but I think @OliverKong answer helped fixing this problem.
from flutter_staggered_grid_view.
An alternative is to slow down scroll speed. For us, that's untenable because the lists can have thousands of items and it takes 90 seconds to reach the bottom.
The @OliverKong solution works for our use case.
from flutter_staggered_grid_view.
Can you test with the latest 0.5.0 preview? https://pub.dev/packages/flutter_staggered_grid_view/versions/0.5.0-dev.1
from flutter_staggered_grid_view.
This thread has been closed since there has not been any response for a while. If you are still experiencing a similar issue, please open a new bug.
from flutter_staggered_grid_view.
Related Issues (20)
- MasonryGridView.builder is still scrolling after being given Neverscrollablescrollphysics
- The position state cannot be restored when you use Navigator.of(context).pop(); HOT 2
- Problems when scrolling up
- Document SliverAlignedGrid and SliverMasonryGrid
- Wrap like effect with fixed width and height for children
- SliverMasonryGrid.extent scroll up jank
- readme, examples out of date
- BorderRadius Issue HOT 1
- Rename `examples` back to `example`
- Scroll to specify wiget ?
- scrolling issues with two SliverMasonryGrid.count in the same CustomScrollView HOT 4
- staggered grid view rendering issue
- Masonry Separator? HOT 2
- Scrolling issue with two SliverMasonryGrid in CustomScrollView HOT 13
- `MasonryGridView.custom` doesn't handle `findChildIndexCallback` properly HOT 1
- Images are getting chopped,if we make the image to cover the tile.
- Tile alignment when first row is not filled.
- Can't use `StaggeredGrid.custom` since `StaggeredGridDelegate` is not accessible through library `flutter_staggered_grid_view`.
- Null error when scrolling back to the top
- Scroll position not preserved when switching tabs HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_staggered_grid_view.