Skip to content

Cupertino back swipe animation crashes when starting at the end position #27774

Closed

Description

@1AlexFix1

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!

Activity

  1. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: cupertino_uicupertino_ui package in flutter/packages
    on Feb 11, 2019
  2. added this to the milestone on Feb 11, 2019
  3. xster commented on Feb 12, 2019

    @xster
    Member

    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?

  4. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 12, 2019
  5. 1AlexFix1 commented on Feb 12, 2019

    @1AlexFix1
    Author

    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?

    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

  6. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 12, 2019
  7. changed the title [-]CupertinoPageRoute bug[/-] [+]Cupertino back swipe animation crashes when starting at the end position[/+] on Feb 12, 2019
  8. xster commented on Feb 12, 2019

    @xster
    Member

    Actually we'll dupe this into #27333 since that one has a screencap :D

  9. 1AlexFix1 commented on Feb 12, 2019

    @1AlexFix1
    Author

    Actually we'll dupe this into #27333 since that one has a screencap :D

    yes sorry, there was no time to do video capture, deadlines are burning

  10. github-actions commented on Aug 14, 2021

    @github-actions

    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.

  11. locked as resolved and limited conversation to collaborators on Aug 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    frameworkflutter/packages/flutter repository. See also f: labels.p: cupertino_uicupertino_ui package in flutter/packages

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions