Repository navigation
Flutter fatal error exist from 6 months ago .. with fix the problem .. #55114
Description
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
Activity
[-]Flutter fetal error exist from 6 months ago .. with fix the problem ..[/-][+]Flutter fatal error exist from 6 months ago .. with fix the problem ..[/+]iapicca commentedon Apr 20, 2020
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.yamland a reproducible minimal code sample.
Thank you
imeDevelopers commentedon Apr 22, 2020
@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 ..
TahaTesser commentedon Apr 23, 2020
Hi @imeDevelopers
You can read about Contributing to Flutter
Regarding the issue, can you please provide your
pubspec.yamlandflutter run --verbose? Also, to better address the issue, would be helpful if you could post a minimal code sample to reproduce the problemThank you
imeDevelopers commentedon May 10, 2020
error happens when i try to take screenshot by scrolling my 3 fingers on the screen up or down ...
TahaTesser commentedon May 11, 2020
Hi @imeDevelopers
Can you please complete minimal reproducible code sample?
Thank you
imeDevelopers commentedon May 11, 2020
@TahaTesser the official example code do the same , i think its on all devices that accept more than 2 fingers at the same time ...
TahaTesser commentedon May 12, 2020
Hi @imeDevelopers
Can you please link the official example?
imeDevelopers commentedon May 12, 2020
https://pub.dev/packages/google_maps_flutter#-example-tab-
TahaTesser commentedon May 13, 2020
Hi @imeDevelopers
Using more than two finger to move map camera has no issue on a physical device
You said
Taking screenshot is device related, something on device might be causing this issue, if you have another device, please try it
Thank you
iapicca commentedon Jun 3, 2020
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.
imeDevelopers commentedon Jul 17, 2020
#54557 (comment)
github-actions commentedon Aug 18, 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.