-
Notifications
You must be signed in to change notification settings - Fork 27.1k
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
Flutter Gallery issues when tapping on 2 demos simultaneously #12470
Comments
This actually looks like an issue in Navigator and not an app bug, as all gallery is doing on these taps is Navigator.pushNamed |
This bug is caused by The stack trace is:
I'm not really familiar with the gesture recognizer, but I suspect the call to |
In this scenario we have a DragGestureRecognizer (DGR) with 2 different TapGestureRecognizers as descendants(TGR1, TGR2). We get the following pointer events sequence: when we get the cancel event in #d, DGR gives up on arena 2; Next, we arrive to #f with _wonArenaForPrimaryPointer already true for TGR2, |
In some scenarios this was leading to double invocation of the tap callbacks. See detailed description in flutter#12470.
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 |
Steps to Reproduce
Repro rate is about 50%, some times you will get the same demo opened twice (e.g you see Shrine, and when you hit back it will pop one page and you're back to Shrine), some times it shows the red exception screen with:
I/flutter ( 8129): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter ( 8129): The following assertion was thrown building ShrinePage(state: ShrinePageState#937bb):
I/flutter ( 8129): Multiple widgets used the same GlobalKey.
I/flutter ( 8129): The key [LabeledGlobalKey#8c7e7 Shrine Home] was used by multiple widgets. The
I/flutter ( 8129): parents of those widgets were:
I/flutter ( 8129): - ShrinePage(state: ShrinePageState#92c4b)
I/flutter ( 8129): - ShrinePage(state: ShrinePageState#937bb)
I/flutter ( 8129): A GlobalKey can only be specified on one widget at a time in the widget tree.
I/flutter ( 8129):
I/flutter ( 8129): When the exception was thrown, this was the stack:
I/flutter ( 8129): #0 GlobalKey._debugReserveFor. (package:flutter/src/widgets/framework.dart:231)
I/flutter ( 8129): #1 GlobalKey._debugReserveFor (package:flutter/src/widgets/framework.dart:249)
I/flutter ( 8129): #2 Element.updateChild. (package:flutter/src/widgets/framework.dart:2659)
I/flutter ( 8129): #3 Element.updateChild (package:flutter/src/widgets/framework.dart:2662)
I/flutter ( 8129): #4 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #5 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #6 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3525)
I/flutter ( 8129): #7 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3663)
I/flutter ( 8129): #8 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3520)
I/flutter ( 8129): #9 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #10 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #11 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #12 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #13 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3525)
I/flutter ( 8129): #14 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3663)
I/flutter ( 8129): #15 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3520)
I/flutter ( 8129): #16 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #17 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #18 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #19 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #20 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3525)
I/flutter ( 8129): #21 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3520)
I/flutter ( 8129): #22 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #23 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #24 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #25 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #26 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3525)
I/flutter ( 8129): #27 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3520)
I/flutter ( 8129): #28 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #29 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #30 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #31 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #32 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3525)
I/flutter ( 8129): #33 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3520)
I/flutter ( 8129): #34 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #35 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #36 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #37 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #38 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3525)
I/flutter ( 8129): #39 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3520)
I/flutter ( 8129): #40 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #41 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #42 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #43 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #44 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3525)
I/flutter ( 8129): #45 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3520)
I/flutter ( 8129): #46 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #47 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #48 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #49 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #50 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3525)
I/flutter ( 8129): #51 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3520)
I/flutter ( 8129): #52 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #53 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #54 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #55 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #56 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3525)
I/flutter ( 8129): #57 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3520)
I/flutter ( 8129): #58 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #59 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #60 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4528)
I/flutter ( 8129): #61 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #62 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #63 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4528)
I/flutter ( 8129): #64 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #65 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #66 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #67 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #68 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3525)
I/flutter ( 8129): #69 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3663)
I/flutter ( 8129): #70 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3520)
I/flutter ( 8129): #71 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #72 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #73 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #74 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #75 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3525)
I/flutter ( 8129): #76 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3520)
I/flutter ( 8129): #77 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #78 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #79 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4528)
I/flutter ( 8129): #80 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #81 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #82 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4528)
I/flutter ( 8129): #83 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #84 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #85 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #86 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #87 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3525)
I/flutter ( 8129): #88 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3520)
I/flutter ( 8129): #89 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #90 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #91 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4528)
I/flutter ( 8129): #92 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #93 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #94 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #95 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #96 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3525)
I/flutter ( 8129): #97 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3663)
I/flutter ( 8129): #98 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3520)
I/flutter ( 8129): #99 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #100 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #101 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #102 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #103 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3525)
I/flutter ( 8129): #104 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3663)
I/flutter ( 8129): #105 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3520)
I/flutter ( 8129): #106 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #107 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #108 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #109 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #110 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3525)
I/flutter ( 8129): #111 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3663)
I/flutter ( 8129): #112 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3520)
I/flutter ( 8129): #113 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2885)
I/flutter ( 8129): #114 Element.updateChild (package:flutter/src/widgets/framework.dart:2688)
I/flutter ( 8129): #115 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4320)
I/flutter ( 8129): #116 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4643)
I/flutter ( 8129): #117 Element.updateChild (package:flutter/src/widgets/framework.dart:2677)
I/flutter ( 8129): #118 _TheatreElement.update (package:flutter/src/widgets/overlay.dart:507)
I/flutter ( 8129): #119 Element.updateChild (package:flutter/src/widgets/framework.dart:2677)
I/flutter ( 8129): #120 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #121 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #122 StatefulElement.update (package:flutter/src/widgets/framework.dart:3682)
I/flutter ( 8129): #123 Element.updateChild (package:flutter/src/widgets/framework.dart:2677)
I/flutter ( 8129): #124 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #125 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #126 ProxyElement.update (package:flutter/src/widgets/framework.dart:3792)
I/flutter ( 8129): #127 Element.updateChild (package:flutter/src/widgets/framework.dart:2677)
I/flutter ( 8129): #128 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4535)
I/flutter ( 8129): #129 Element.updateChild (package:flutter/src/widgets/framework.dart:2677)
I/flutter ( 8129): #130 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #131 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #132 StatefulElement.update (package:flutter/src/widgets/framework.dart:3682)
I/flutter ( 8129): #133 Element.updateChild (package:flutter/src/widgets/framework.dart:2677)
I/flutter ( 8129): #134 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4535)
I/flutter ( 8129): #135 Element.updateChild (package:flutter/src/widgets/framework.dart:2677)
I/flutter ( 8129): #136 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4535)
I/flutter ( 8129): #137 Element.updateChild (package:flutter/src/widgets/framework.dart:2677)
I/flutter ( 8129): #138 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3557)
I/flutter ( 8129): #139 Element.rebuild (package:flutter/src/widgets/framework.dart:3446)
I/flutter ( 8129): #140 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2246)
I/flutter ( 8129): #141 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:580)
I/flutter ( 8129): #142 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:200)
I/flutter ( 8129): #143 BindingBase&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:713)
I/flutter ( 8129): #144 BindingBase&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:649)
I/flutter ( 8129): #145 _invoke (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:91)
I/flutter ( 8129): #146 _drawFrame (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:80)
I/flutter ( 8129): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter ( 8129): Another exception was thrown: Multiple widgets used the same GlobalKey.
The text was updated successfully, but these errors were encountered: