Repository navigation
Cupertino back swipe animation crashes when starting at the end position #27774
Copy link
Copy link
Closed
Labels
frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.p: cupertino_uicupertino_ui package in flutter/packagescupertino_ui package in flutter/packages
Description
Hi, I found a problem with CupertinoPageRoute if you start swiping the screen that was shown using CupertinoPageRoute and then not releasing the scrolling and returning the screen to its original state(left side), this error will appear and the scroll function will not work on the screen.
Error
flutter: ══╡ EXCEPTION CAUGHT BY GESTURE ╞═══════════════════════════════════════════════════════════════════
flutter: The following assertion was thrown while handling a gesture:
flutter: 'package:flutter/src/cupertino/route.dart': Failed assertion: line 637 pos 12:
flutter: 'controller.isAnimating': is not true.
flutter:
flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
flutter: more information in this error message to help you determine and fix the underlying cause.
flutter: In either case, please report this assertion by filing a bug on GitHub:
flutter: https://github.com/flutter/flutter/issues/new?template=BUG.md
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #2 _CupertinoBackGestureController.dragEnd (package:flutter/src/cupertino/route.dart:637:12)
flutter: #3 _CupertinoBackGestureDetectorState._handleDragEnd (package:flutter/src/cupertino/route.dart:507:28)
flutter: #4 DragGestureRecognizer.didStopTrackingLastPointer.<anonymous closure> (package:flutter/src/gestures/monodrag.dart:262:45)
flutter: #5 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:120:24)
flutter: #6 DragGestureRecognizer.didStopTrackingLastPointer (package:flutter/src/gestures/monodrag.dart:262:9)
flutter: #7 OneSequenceGestureRecognizer.stopTrackingPointer (package:flutter/src/gestures/recognizer.dart:249:9)
flutter: #8 OneSequenceGestureRecognizer.stopTrackingIfPointerNoLongerDown (package:flutter/src/gestures/recognizer.dart:258:7)
flutter: #9 DragGestureRecognizer.handleEvent (package:flutter/src/gestures/monodrag.dart:193:5)
flutter: #10 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:73:12)
flutter: #11 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101:11)
flutter: #12 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:214:19)
flutter: #13 _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:192:22)
flutter: #14 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:149:7)
flutter: #15 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:101:7)
flutter: #16 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:85:7)
flutter: #20 _invoke1 (dart:ui/hooks.dart:223:10)
flutter: #21 _dispatchPointerDataPacket (dart:ui/hooks.dart:144:5)
flutter: (elided 5 frames from class _AssertionError and package dart:async)
flutter:
flutter: Handler: onEnd
flutter: Recognizer:
flutter: HorizontalDragGestureRecognizer#8e976(debugOwner:
flutter: _CupertinoBackGestureDetectorState<dynamic>#8bf17, start behavior: down)
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
[✓] Flutter (Channel master, v1.2.1-pre.142, on Mac OS X 10.14.3 18D109, locale ru-RU)
• Flutter version 1.2.1-pre.142 at /Users/alexanderkotkov/Flutter/flutter
• Framework revision fec01201b1 (2 days ago), 2019-02-09 11:23:28 -0500
• Engine revision 067045757f
• Dart version 2.1.2 (build 2.1.2-dev.0.0 174d6fec3d)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/alexanderkotkov/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.1, Build version 10B61
• ios-deploy 1.9.4
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 32.0.1
• Dart plugin version 182.5215
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[✓] Connected device (1 available)
• iPhone XR • 48FE2832-2E5A-4071-8122-6F7CBE05C762 • ios • iOS 12.1 (simulator)
• No issues found!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.p: cupertino_uicupertino_ui package in flutter/packagescupertino_ui package in flutter/packages
Activity
xster commentedon Feb 12, 2019
Just double checking, is the repro that you started edge swiping the page, dragged it in a bit, and then tried to drag it back to the very edge of the screen, and then released it, it would cause the above error?
1AlexFix1 commentedon Feb 12, 2019
yes, for example, in numbers it looks like
left side page start position x = 0 then i swipe and left side page x > 0 then return to start position left side x = 0 then take get an error and retry swipe no work
[-]CupertinoPageRoute bug[/-][+]Cupertino back swipe animation crashes when starting at the end position[/+]xster commentedon Feb 12, 2019
Actually we'll dupe this into #27333 since that one has a screencap :D
1AlexFix1 commentedon Feb 12, 2019
yes sorry, there was no time to do video capture, deadlines are burning
github-actions commentedon Aug 14, 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 -vand a minimal reproduction of the issue.