You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The suggestion would be to add a null check to the offending function.
Crash Log:
E/MethodChannel#flutter/platform_views: Failed to handle method call
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.mapbox.android.gestures.MoveDistancesObject.addNewPosition(float, float)' on a null object reference
at com.mapbox.android.gestures.MoveGestureDetector.updateMoveDistancesObjects(MoveGestureDetector.java:172)
at com.mapbox.android.gestures.MoveGestureDetector.analyzeMovement(MoveGestureDetector.java:147)
at com.mapbox.android.gestures.MultiFingerGesture.analyzeEvent(MultiFingerGesture.java:106)
at com.mapbox.android.gestures.ProgressiveGesture.analyzeEvent(ProgressiveGesture.java:55)
at com.mapbox.android.gestures.MoveGestureDetector.analyzeEvent(MoveGestureDetector.java:141)
at com.mapbox.android.gestures.BaseGesture.analyze(BaseGesture.java:61)
at com.mapbox.android.gestures.BaseGesture.onTouchEvent(BaseGesture.java:39)
at com.mapbox.android.gestures.AndroidGesturesManager.onTouchEvent(AndroidGesturesManager.java:193)
at com.mapbox.mapboxgl.MapboxMapController$1.onTouch(MapboxMapController.java:199)
at android.view.View.dispatchTouchEvent(View.java:13479)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3082)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2767)
at io.flutter.plugin.platform.PlatformViewsController$1.onTouch(PlatformViewsController.java:313)
at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.touch(PlatformViewsChannel.java:176)
at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:68)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:296)
at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$DartMessenger(DartMessenger.java:320)
at io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$TsixYUB5E6FpKhMtCSQVHKE89gQ.run(Unknown Source:12)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7562)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
E/flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(error, Attempt to invoke virtual method 'void com.mapbox.android.gestures.MoveDistancesObject.addNewPosition(float, float)' on a null object reference, null, java.lang.NullPointerException: Attempt to invoke virtual method 'void com.mapbox.android.gestures.MoveDistancesObject.addNewPosition(float, float)' on a null object reference
at com.mapbox.android.gestures.MoveGestureDetector.updateMoveDistancesObjects(MoveGestureDetector.java:172)
at com.mapbox.android.gestures.MoveGestureDetector.analyzeMovement(MoveGestureDetector.java:147)
at com.mapbox.android.gestures.MultiFingerGesture.analyzeEvent(MultiFingerGesture.java:106)
at com.mapbox.android.gestures.ProgressiveGesture.analyzeEvent(ProgressiveGesture.java:55)
at com.mapbox.android.gestures.MoveGestureDetector.analyzeEvent(MoveGestureDetector.java:141)
at com.mapbox.android.gestures.BaseGesture.analyze(BaseGesture.java:61)
at com.mapbox.android.gestures.BaseGesture.onTouchEvent(BaseGesture.java:39)
at com.mapbox.android.gestures.AndroidGesturesManager.onTouchEvent(AndroidGesturesManager.java:193)
at com.mapbox.mapboxgl.MapboxMapController$1.onTouch(MapboxMapController.java:199)
at android.view.View.dispatchTouchEvent(View.java:13479)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3082)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2767)
at io.flutter.plugin.platform.PlatformViewsController$1.onTouch(PlatformViewsController.java:313)
at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.touch(PlatformViewsChannel.java:176)
at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:68)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:296)
at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$DartMessenger(DartMessenger.java:320)
at io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$TsixYUB5E6FpKhMtCSQVHKE89gQ.run(Unknown Source:12)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7562)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:177:18)
<asynchronous suspension>
#2 AndroidViewController.sendMotionEvent (package:flutter/src/services/platform_views.dart:803:5)
<asynchronous suspension>
#3 AndroidViewController.dispatchPointerEvent (package:flutter/src/services/platform_views.dart:895:7)
<asynchronous suspension>
The text was updated successfully, but these errors were encountered:
In rare cases the MoveGestureDetector causes and error while gestures are processed.
mapbox-gestures-android/library/src/main/java/com/mapbox/android/gestures/MoveGestureDetector.java
Line 172 in 6fc34d9
This seems to be related to using Flutters Hybrid Composition
more details:
flutter-mapbox-gl/maps#975
The suggestion would be to add a null check to the offending function.
Crash Log:
The text was updated successfully, but these errors were encountered: