Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception after tapping repeatedly on Components in Material Gallery #3183

Closed
jason-simmons opened this issue Apr 7, 2016 · 4 comments · Fixed by #3552
Closed

Exception after tapping repeatedly on Components in Material Gallery #3183

jason-simmons opened this issue Apr 7, 2016 · 4 comments · Fixed by #3552
Labels
c: crash Stack traces logged to the console customer: gallery Relating to flutter/gallery repository. Please transfer non-framework issues there. framework flutter/packages/flutter repository. See also f: labels.
Milestone

Comments

@jason-simmons
Copy link
Member

jason-simmons commented Apr 7, 2016

Run the Material Gallery sample and tap on the Components drop-down several times in quick succession.

The framework throws this exception:

I/flutter ( 5324): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════════════════════════
I/flutter ( 5324): The following exception was raised during performLayout():
I/flutter ( 5324): 'package:flutter/src/rendering/box.dart': Failed assertion: line 511: 'debugDoingThisResize || debugDoingThisLayout ||
I/flutter ( 5324):                   (RenderObject.debugActiveLayout == parent && _size._canBeUsedByParent)' is not true.
I/flutter ( 5324): Either the assertion indicates an error in the framework itself, or we should provide substantially more information in
I/flutter ( 5324): this error message to help you determine and fix the underlying cause.
I/flutter ( 5324): In either case, please report this assertion by filing a bug on GitHub:
I/flutter ( 5324):   https://github.com/flutter/flutter/issues/new
I/flutter ( 5324): The following RenderObject was being processed when the exception was fired:
I/flutter ( 5324): RenderViewport NEEDS-LAYOUT
I/flutter ( 5324): This RenderObject had the following creator:
I/flutter ( 5324):   Viewport ← Listener ← _GestureSemantics ← RawGestureDetector-[GlobalKey 498787747] ← ScrollableViewport-['Gallery
I/flutter ( 5324):   List'] ← Block ← TwoLevelList ← LayoutId-['_ScaffoldSlot.body'] ← CustomMultiChildLayout ←
I/flutter ( 5324):   NotificationListener<ScrollNotification> ← ⋯
I/flutter ( 5324): This RenderObject had the following descendants (showing up to depth 5):
I/flutter ( 5324):   RenderPadding relayoutSubtreeRoot=up1
I/flutter ( 5324):     RenderBlock relayoutSubtreeRoot=up2
I/flutter ( 5324):       RenderDecoratedBox relayoutSubtreeRoot=up3
I/flutter ( 5324):         RenderPadding relayoutSubtreeRoot=up4
I/flutter ( 5324):           RenderFlex relayoutSubtreeRoot=up5
I/flutter ( 5324):       RenderDecoratedBox relayoutSubtreeRoot=up3
I/flutter ( 5324):         RenderPadding relayoutSubtreeRoot=up4
I/flutter ( 5324):           RenderFlex relayoutSubtreeRoot=up5
I/flutter ( 5324):       RenderDecoratedBox relayoutSubtreeRoot=up3
I/flutter ( 5324):         RenderPadding relayoutSubtreeRoot=up4
I/flutter ( 5324):           RenderFlex relayoutSubtreeRoot=up5
I/flutter ( 5324): Stack trace:
I/flutter ( 5324): #0      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:27)
I/flutter ( 5324): #1      RenderBox.size.<anonymous closure> (package:flutter/src/rendering/box.dart:511)
I/flutter ( 5324): #2      RenderBox.size (package:flutter/src/rendering/box.dart:501)
I/flutter ( 5324): #3      RenderInkFeatures.splashAt (package:flutter/src/material/material.dart:216)
I/flutter ( 5324): #4      _InkResponseState._handleTapDown (package:flutter/src/material/ink_well.dart:96)
I/flutter ( 5324): #5      TapGestureRecognizer._checkDown (package:flutter/src/gestures/tap.dart:77)
I/flutter ( 5324): #6      TapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:57)
I/flutter ( 5324): #7      GestureArenaManager._tryToResolveArena (package:flutter/src/gestures/arena.dart:138)
I/flutter ( 5324): #8      GestureArenaManager._resolve (package:flutter/src/gestures/arena.dart:155)
I/flutter ( 5324): #9      GestureArenaEntry.resolve (package:flutter/src/gestures/arena.dart:45)
I/flutter ( 5324): #10     OneSequenceGestureRecognizer.resolve (package:flutter/src/gestures/recognizer.dart:77)
I/flutter ( 5324): #11     OneSequenceGestureRecognizer.dispose (package:flutter/src/gestures/recognizer.dart:82)
I/flutter ( 5324): #12     _DragGestureRecognizer.dispose (package:flutter/src/gestures/drag.dart:136)
I/flutter ( 5324): #13     RawGestureDetectorState._syncAll (package:flutter/src/widgets/gesture_detector.dart:381)
I/flutter ( 5324): #14     RawGestureDetectorState.replaceGestureRecognizers (package:flutter/src/widgets/gesture_detector.dart:353)
I/flutter ( 5324): #15     ScrollableState.updateGestureDetector (package:flutter/src/widgets/scrollable.dart:569)
I/flutter ( 5324): #16     _ScrollableViewportState._handlePaintOffsetUpdateNeeded (package:flutter/src/widgets/scrollable.dart:687)
I/flutter ( 5324): #17     RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:305)
I/flutter ( 5324): #18     RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1100)
I/flutter ( 5324): #19     PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:703)
I/flutter ( 5324): #20     BindingBase&Scheduler&Gesturer&Services&Renderer.beginFrame (package:flutter/src/rendering/binding.dart:88)
I/flutter ( 5324): #21     WidgetFlutterBinding.beginFrame (package:flutter/src/widgets/binding.dart:103)
I/flutter ( 5324): #22     BindingBase&Scheduler&Gesturer&Services&Renderer._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:82)
I/flutter ( 5324): #23     BindingBase&Scheduler.invokeFrameCallback (package:flutter/src/scheduler/scheduler.dart:270)
I/flutter ( 5324): #24     BindingBase&Scheduler.handleBeginFrame (package:flutter/src/scheduler/scheduler.dart:247)
I/flutter ( 5324): #25     _beginFrame (file:///ssd2/sky/engine/src/out/android_Debug/gen/sky/bindings/hooks.dart:48)
@jason-simmons
Copy link
Member Author

@Hixie

@abarth abarth added c: crash Stack traces logged to the console customer: gallery Relating to flutter/gallery repository. Please transfer non-framework issues there. labels Apr 7, 2016
@sethladd sethladd added the framework flutter/packages/flutter repository. See also f: labels. label Apr 25, 2016
@sethladd sethladd added this to the Gallery App milestone Apr 25, 2016
@abarth
Copy link
Contributor

abarth commented Apr 26, 2016

@Hixie This crash is very interesting. RawGestureDetectorState._syncAll is causing us to dispose a drag gesture recognizer, which is causing a tap recognizer to win in the arena and fire a tap gesture in the middle of layout. All manner of insanity then takes place.

I suspect the solution is to delay win-by-last-gesture-standing in the arena to the end of the microtask. Thoughts?

@Hixie
Copy link
Contributor

Hixie commented Apr 26, 2016

Seems legit. Can't see any reason it would need to be synchronous.

abarth added a commit to abarth/flutter that referenced this issue Apr 26, 2016
Wait until the end of the microtask to tell gesture recognizers that
they've won in the gesture arena. This lets recognizers dispose reject
themselves at arbitrary times without triggering gestures in awkward
call stacks.

Fixes flutter#3183
abarth added a commit that referenced this issue Apr 26, 2016
Wait until the end of the microtask to tell gesture recognizers that
they've won in the gesture arena. This lets recognizers dispose reject
themselves at arbitrary times without triggering gestures in awkward
call stacks.

Fixes #3183
@github-actions
Copy link

github-actions bot commented Sep 6, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: crash Stack traces logged to the console customer: gallery Relating to flutter/gallery repository. Please transfer non-framework issues there. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants