Skip to content

Flutter fatal error exist from 6 months ago .. with fix the problem .. #55114

Closed

Description

@imeDevelopers

the problems happen when i try to move google maps flutter map ..

problem error:

╞╕•••••••••••••••••••••••••••••••••••••••â
••••••••••••••••••
[  +38 ms] I/flutter (19197): The following assertion was thrown while routing a pointer event:
[ +148 ms] I/flutter (19197): 'package:flutter/src/services/platform_views.dart': Failed assertion: line 314 pos 15: 'downTime
!=
[   +2 ms] I/flutter (19197): null': is not true.
[   +1 ms] I/flutter (19197):
[   +1 ms] I/flutter (19197): Either the assertion indicates an error in the framework itself, or we should provide
substantially
[   +2 ms] I/flutter (19197): more information in this error message to help you determine and fix the underlying cause.
[   +1 ms] I/flutter (19197): In either case, please report this assertion by filing a bug on GitHub:
[   +1 ms] I/flutter (19197):   https://github.com/flutter/flutter/issues/new?template=BUG.md
[   +1 ms] I/flutter (19197):
[   +1 ms] I/flutter (19197): When the exception was thrown, this was the stack:
[  +18 ms] I/flutter (19197): #2      new AndroidMotionEvent (package:flutter/src/services/platform_views.dart:314:15)
[        ] I/flutter (19197): #3      _MotionEventsDispatcher.dispatchPointerEvent
(package:flutter/src/rendering/platform_view.dart:634:51)
[   +1 ms] I/flutter (19197): #4      _MotionEventsDispatcher.handlePointerEvent
(package:flutter/src/rendering/platform_view.dart:578:5)
[ +204 ms] I/flutter (19197): #5      _PlatformViewGestureRecognizer.handleEvent
(package:flutter/src/rendering/platform_view.dart:512:26)
[   +2 ms] I/flutter (19197): #6      PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:76:12)
[   +1 ms] I/flutter (19197): #7      PointerRouter._dispatchEventToRoutes.<anonymous closure>
(package:flutter/src/gestures/pointer_router.dart:122:9)
[   +1 ms] I/flutter (19197): #8      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8)
[   +1 ms] I/flutter (19197): #9      PointerRouter._dispatchEventToRoutes
(package:flutter/src/gestures/pointer_router.dart:120:18)
[   +1 ms] I/flutter (19197): #10     PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:106:7)
[   +1 ms] I/flutter (19197): #11     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:218:19)
[   +1 ms] I/flutter (19197): #12     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
[   +1 ms] I/flutter (19197): #13     GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7)
[   +1 ms] I/flutter (19197): #14     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7)
[   +1 ms] I/flutter (19197): #15     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7)
[   +1 ms] I/flutter (19197): #19     _invoke1 (dart:ui/hooks.dart:275:10)
[   +1 ms] I/flutter (19197): #20     _dispatchPointerDataPacket (dart:ui/hooks.dart:184:5)
[   +1 ms] I/flutter (19197): (elided 5 frames from class _AssertionError and dart:async)
[   +1 ms] I/flutter (19197):
[        ] I/flutter (19197): Event:
[   +1 ms] I/flutter (19197):   PointerMoveEvent#0b8a1(position: Offset(196.0, 326.0))

how to fix:

open platform_views.dart in you flutter folder , for example ..

your flutter path \packages\flutter\lib\src\rendering\platform_view.dart

search for this line of code: pointerPositions[event.pointer] = coordsFor(event);

insert this line of code: if (downTimeMillis == null) return; under this block:

    if (event is PointerDownEvent) {
      if (nextPointerId == 0)
        downTimeMillis = event.timeStamp.inMilliseconds;
      pointerProperties[event.pointer] = propertiesFor(event, nextPointerId++);
    }

the final code will be:

    if (event is PointerDownEvent) {
      if (nextPointerId == 0)
        downTimeMillis = event.timeStamp.inMilliseconds;
      pointerProperties[event.pointer] = propertiesFor(event, nextPointerId++);
    }
    if (downTimeMillis == null) return;

the problem are now solved .. , there is one small problem ...

if you tried to upgrade your flutter with command flutter upgrade command it will tell you that you have local changes in your flutter file and will tell you to use --force parameter to be able to upgrade your flutter .. ,the problem is you will re-do above steps to fix the problem again everytime you upgrade flutter .. because the file will be changed after upgrade and without they fix the problem that exist from 6 months ago !!

Android: 9 pie

flutter doctor -v

Activity

  1. changed the title [-]Flutter fetal error exist from 6 months ago .. with fix the problem ..[/-] [+]Flutter fatal error exist from 6 months ago .. with fix the problem ..[/+] on Apr 20, 2020
  2. iapicca commented on Apr 20, 2020

    @iapicca

    Hi @imeDevelopers
    I'm not sure that the right solution for a failed assertion is to change the source code,
    nevertheless feel free to submit a PR.

    Regarding the issue you are experiencing with the official code
    could you please provide your pubspec.yaml
    and a reproducible minimal code sample.
    Thank you

  3. added
    in triagePresently being triaged by the triage team
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Apr 20, 2020
  4. imeDevelopers commented on Apr 22, 2020

    @imeDevelopers
    Author

    @iapicca this is what happens brother ... , Its the problem and how i solve it .. i dont know what is PR and how to provide it ..

  5. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Apr 22, 2020
  6. TahaTesser commented on Apr 23, 2020

    @TahaTesser
    Contributor

    Hi @imeDevelopers
    You can read about Contributing to Flutter

    Regarding the issue, can you please provide your pubspec.yaml and flutter run --verbose? Also, to better address the issue, would be helpful if you could post a minimal code sample to reproduce the problem
    Thank you

  7. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Apr 23, 2020
  8. imeDevelopers commented on May 10, 2020

    @imeDevelopers
    Author

    error happens when i try to take screenshot by scrolling my 3 fingers on the screen up or down ...

    [        ] E/flutter (  552): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: NoSuchMethodError: The method
    '_asList' was called on null.
    [        ] E/flutter (  552): Receiver: null
    [        ] E/flutter (  552): Tried calling: _asList()
    [        ] E/flutter (  552): #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
    [        ] E/flutter (  552): #1      AndroidMotionEvent._asList.<anonymous closure>
    (package:flutter/src/services/platform_views.dart:402:74)
    [        ] E/flutter (  552): #2      MappedListIterable.elementAt (dart:_internal/iterable.dart:417:31)
    [        ] E/flutter (  552): #3      ListIterator.moveNext (dart:_internal/iterable.dart:343:26)
    [        ] E/flutter (  552): #4      new List.from (dart:core-patch/array_patch.dart:38:29)
    [        ] E/flutter (  552): #5      new List.of (dart:core-patch/array_patch.dart:68:17)
    [        ] E/flutter (  552): #6      ListIterable.toList (dart:_internal/iterable.dart:211:44)
    [        ] E/flutter (  552): #7      AndroidMotionEvent._asList (package:flutter/src/services/platform_views.dart:402:85)
    [        ] E/flutter (  552): #8      AndroidViewController.sendMotionEvent
    (package:flutter/src/services/platform_views.dart:608:15)
    [        ] E/flutter (  552): #9      _MotionEventsDispatcher.dispatchPointerEvent
    (package:flutter/src/rendering/platform_view.dart:650:20)
    [        ] E/flutter (  552): #10     _MotionEventsDispatcher.handlePointerEvent
    (package:flutter/src/rendering/platform_view.dart:578:5)
    [        ] E/flutter (  552): #11     _PlatformViewGestureRecognizer.handleEvent
    (package:flutter/src/rendering/platform_view.dart:512:26)
    [        ] E/flutter (  552): #12     PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:76:12)
    [        ] E/flutter (  552): #13     PointerRouter._dispatchEventToRoutes.<anonymous closure>
    (package:flutter/src/gestures/pointer_router.dart:122:9)
    [        ] E/flutter (  552): #14     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
    [        ] E/flutter (  552): #15     PointerRouter._dispatchEventToRoutes
    (package:flutter/src/gestures/pointer_router.dart:120:18)
    [        ] E/flutter (  552): #16     PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:106:7)
    [        ] E/flutter (  552): #17     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:218:19)
    [        ] E/flutter (  552): #18     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
    [        ] E/flutter (  552): #19     GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7)
    [        ] E/flutter (  552): #20     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7)
    [        ] E/flutter (  552): #21     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7)
    [        ] E/flutter (  552): #22     _rootRunUnary (dart:async/zone.dart:1206:13)
    [        ] E/flutter (  552): #23     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
    [        ] E/flutter (  552): #24     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
    [        ] E/flutter (  552): #25     _invoke1 (dart:ui/hooks.dart:291:10)
    [        ] E/flutter (  552): #26     _dispatchPointerDataPacket (dart:ui/hooks.dart:200:5)
    [        ] E/flutter (  552):
    
  9. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 10, 2020
  10. TahaTesser commented on May 11, 2020

    @TahaTesser
    Contributor

    Hi @imeDevelopers
    Can you please complete minimal reproducible code sample?
    Thank you

  11. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 11, 2020
  12. imeDevelopers commented on May 11, 2020

    @imeDevelopers
    Author

    @TahaTesser the official example code do the same , i think its on all devices that accept more than 2 fingers at the same time ...

  13. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 11, 2020
  14. TahaTesser commented on May 12, 2020

    @TahaTesser
    Contributor

    Hi @imeDevelopers
    Can you please link the official example?

  15. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 12, 2020
  16. imeDevelopers commented on May 12, 2020

    @imeDevelopers
    Author
  17. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 12, 2020
  18. TahaTesser commented on May 13, 2020

    @TahaTesser
    Contributor

    Hi @imeDevelopers
    Using more than two finger to move map camera has no issue on a physical device

    You said

    error happens when i try to take screenshot by scrolling my 3 fingers on the screen up or down 
    

    Taking screenshot is device related, something on device might be causing this issue, if you have another device, please try it
    Thank you

  19. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 13, 2020
  20. iapicca commented on Jun 3, 2020

    @iapicca

    Without additional information we are unfortunately not sure how to resolve this issue.
    We are therefore reluctantly going to close this bug for now.
    Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
    Thanks for your contribution.

    Could everyone who still has this problem please file a new issue with the exact description of what happens, logs and the output of flutter doctor -v.
    All system setups can be slightly different, so it's always better to open new issues and reference related issues.

  21. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jun 3, 2020
  22. imeDevelopers commented on Jul 17, 2020

    @imeDevelopers
    Author
  23. github-actions commented on Aug 18, 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.

  24. locked as resolved and limited conversation to collaborators on Aug 18, 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

    in triagePresently being triaged by the triage team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions