Closed paulVulog closed 2 years ago
this flag will be removed in the next release - for now keep it turned off.
2 additionnal info :
First, if we turn the flag off, we fall back to those issues : https://github.com/flutter-mapbox-gl/maps/issues/763 https://github.com/flutter-mapbox-gl/maps/pull/916
-> So I cannot set the flag to false, because on some devices, it breaks the Map
Secondly, I have tested the same behavior on the GoogleMap sample app : https://github.com/flutter/plugins/tree/main/packages/google_maps_flutter/google_maps_flutter
I am able to reproduce the same kind of issue, Except that the google map do not Crash. There is only some flutter Error log :
I/ViewRootImpl@4ffe3aa[FlutterActivity](18949): ViewPostIme pointer 0
E/MethodChannel#flutter/platform_views(18949): Failed to handle method call
E/MethodChannel#flutter/platform_views(18949): java.lang.IllegalArgumentException: pointerIndex out of range
E/MethodChannel#flutter/platform_views(18949): at android.view.MotionEvent.nativeGetPointerId(Native Method)
E/MethodChannel#flutter/platform_views(18949): at android.view.MotionEvent.getPointerId(MotionEvent.java:2717)
E/MethodChannel#flutter/platform_views(18949): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3585)
E/MethodChannel#flutter/platform_views(18949): at io.flutter.plugin.platform.PlatformViewsController$1.onTouch(PlatformViewsController.java:313)
E/MethodChannel#flutter/platform_views(18949): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.touch(PlatformViewsChannel.java:176)
E/MethodChannel#flutter/platform_views(18949): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:68)
E/MethodChannel#flutter/platform_views(18949): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
E/MethodChannel#flutter/platform_views(18949): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:296)
E/MethodChannel#flutter/platform_views(18949): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$DartMessenger(DartMessenger.java:320)
E/MethodChannel#flutter/platform_views(18949): at io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$AIEPqY6mWzaNK15HekX9bftoAXs.run(Unknown Source:12)
E/MethodChannel#flutter/platform_views(18949): at android.os.Handler.handleCallback(Handler.java:883)
E/MethodChannel#flutter/platform_views(18949): at android.os.Handler.dispatchMessage(Handler.java:100)
E/MethodChannel#flutter/platform_views(18949): at android.os.Looper.loop(Looper.java:237)
E/MethodChannel#flutter/platform_views(18949): at android.app.ActivityThread.main(ActivityThread.java:8167)
E/MethodChannel#flutter/platform_views(18949): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter/platform_views(18949): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
E/MethodChannel#flutter/platform_views(18949): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
I/ViewRootImpl@4ffe3aa[FlutterActivity](18949): ViewPostIme pointer 1
E/flutter (18949): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(error, pointerIndex out of range, null, java.lang.IllegalArgumentException: pointerIndex out of range
E/flutter (18949): at android.view.MotionEvent.nativeGetPointerId(Native Method)
E/flutter (18949): at android.view.MotionEvent.getPointerId(MotionEvent.java:2717)
E/flutter (18949): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3585)
E/flutter (18949): at io.flutter.plugin.platform.PlatformViewsController$1.onTouch(PlatformViewsController.java:313)
E/flutter (18949): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.touch(PlatformViewsChannel.java:176)
E/flutter (18949): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:68)
E/flutter (18949): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
E/flutter (18949): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:296)
E/flutter (18949): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$DartMessenger(DartMessenger.java:320)
E/flutter (18949): at io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$AIEPqY6mWzaNK15HekX9bftoAXs.run(Unknown Source:12)
E/flutter (18949): at android.os.Handler.handleCallback(Handler.java:883)
E/flutter (18949): at android.os.Handler.dispatchMessage(Handler.java:100)
E/flutter (18949): at android.os.Looper.loop(Looper.java:237)
E/flutter (18949): at android.app.ActivityThread.main(ActivityThread.java:8167)
E/flutter (18949): at java.lang.reflect.Method.invoke(Native Method)
E/flutter (18949): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
E/flutter (18949): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
E/flutter (18949): )
E/flutter (18949): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
E/flutter (18949): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:177:18)
E/flutter (18949): <asynchronous suspension>
E/flutter (18949): #2 AndroidViewController.sendMotionEvent (package:flutter/src/services/platform_views.dart:803:5)
E/flutter (18949): <asynchronous suspension>
E/flutter (18949): #3 AndroidViewController.dispatchPointerEvent (package:flutter/src/services/platform_views.dart:895:7)
E/flutter (18949): <asynchronous suspension>
E/flutter (18949):
Thanks for the analysis. To me it seems like:
Sadly this seems to be very much an upstream problem.
@paulVulog can you report this issue to the mapbox android and flutter upstream repos? (Mention the issue with google maps for the flutter one)
@felix-ht Yes, I will propagate this issue.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue relates to MapboxGL v0.16.0 and https://github.com/flutter-mapbox-gl/maps/pull/916 All the following issues was tested and reproduced on Samsung S9+ - Android 10
When running an app with MapboxMap.useHybridComposition = true; and doing some multitouch on the map, you can easily get some app crashes.
here are the produced logs :
Way to reproduce using the Mapbox Gl sample app:
This will simply add a widget on top of the map to reproduce the crash.
One digit on the map The Other One on the green widget Tap both at the same time.
You will get a crash.
It only crash if you tap a widget (flutter) stacked on top of the map (nativ view because of .useHybridComposition = true)