mapbox / mapbox/mapbox-maps-flutter

Crash Native Method on 1.1.0 version

Open
#515 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
380
Forks
204
PR merge metrics
No merged PRs in 30d

Description

**StackTrace**

`java.lang.IllegalArgumentException: Parse error at offset 39: Missing a comma or ']' after an array element.
at com.mapbox.maps.StyleManager.setStyleSourceProperty(Native Method)
at com.mapbox.maps.MapboxStyleManager.setStyleSourceProperty(MapboxStyleManager.kt:23)
at com.mapbox.maps.plugin.locationcomponent.ModelSourceWrapper.updateProperty(ModelSourceWrapper.kt:12)
at com.mapbox.maps.plugin.locationcomponent.ModelSourceWrapper.setPositionAndOrientation(ModelSourceWrapper.kt:164)
at com.mapbox.maps.plugin.locationcomponent.ModelLayerRenderer.updateLocationOrBearing(ModelLayerRenderer.kt:65)
at com.mapbox.maps.plugin.locationcomponent.ModelLayerRenderer.setLayerLocation(ModelLayerRenderer.kt:3)
at com.mapbox.maps.plugin.locationcomponent.ModelLayerRenderer.setLatLng(ModelLayerRenderer.kt:6)
at com.mapbox.maps.plugin.locationcomponent.animators.PuckPositionAnimator.updateLayer(PuckPositionAnimator.kt:2)
at com.mapbox.maps.plugin.locationcomponent.animators.PuckPositionAnimator.updateLayer(PuckPositionAnimator.kt:1)
at com.mapbox.maps.plugin.locationcomponent.animators.PuckAnimator$1$1.invoke(PuckAnimator.kt:3)
at com.mapbox.maps.plugin.locationcomponent.animators.PuckAnimator$1$1.invoke(PuckAnimator.kt:1)
at com.mapbox.maps.threading.AnimationThreadController.postOnMainThread(AnimationThreadController.kt:20)
at com.mapbox.maps.plugin.locationcomponent.animators.PuckAnimator._init_$lambda$0(PuckAnimator.kt:18)
at com.mapbox.maps.plugin.locationcomponent.animators.PuckAnimator.b(Unknown Source:0)
at com.mapbox.maps.plugin.locationcomponent.animators.c.onAnimationUpdate(Unknown Source:2)
at android.animation.ValueAnimator.animateValue(ValueAnimator.java:1566)
at android.animation.ValueAnimator.setCurrentFraction(ValueAnimator.java:692)
at android.animation.ValueAnimator.setCurrentPlayTime(ValueAnimator.java:655)
at android.animation.ValueAnimator.start(ValueAnimator.java:1087)
at android.animation.ValueAnimator.start(ValueAnimator.java:1106)
at com.mapbox.maps.plugin.locationcomponent.animators.PuckAnimator$animate$1.invoke(PuckAnimator.kt:2)
at com.mapbox.maps.plugin.locationcomponent.animators.PuckAnimator$animate$1.invoke(PuckAnimator.kt:1)
at com.mapbox.maps.threading.AnimationThreadController.postOnMainThread(AnimationThreadController.kt:20)
at com.mapbox.maps.threading.AnimationThreadController.postOnAnimatorThread(AnimationThreadController.kt:55)
at com.mapbox.maps.plugin.locationcomponent.animators.PuckAnimator.animate(PuckAnimator.kt:26)
at com.mapbox.maps.plugin.locationcomponent.animators.PuckAnimatorManager.animatePosition(PuckAnimatorManager.kt:13)
at com.mapbox.maps.plugin.locationcomponent.LocationPuckManager.updateCurrentPosition(LocationPuckManager.kt:83)
at com.mapbox.maps.plugin.locationcomponent.LocationComponentPluginImpl.onLocationUpdated(LocationComponentPluginImpl.kt:17)
at com.mapbox.maps.plugin.locationcomponent.LocationConsumer$DefaultImpls.onLocationUpdated$default(LocationConsumer.kt:8)
at com.mapbox.maps.plugin.locationcomponent.DefaultLocationProvider$collectLocationFlow$1$1$2.emit(DefaultLocationProvider.kt:2)
at com.mapbox.maps.plugin.locationcomponent.DefaultLocationProvider$collectLocationFlow$1$1$2.emit(DefaultLocationProvider.kt:1)
at com.mapbox.maps.plugin.locationcomponent.DefaultLocationProvider$collectLocationFlow$1$1$invokeSuspend$$inlined$map$1$2.emit(Emitters.kt:102)
at cz.a0.A(SharedFlow.kt:204)
at cz.a0$c.invokeSuspend(Unknown Source:12)
at gy.a.resumeWith(ContinuationImpl.kt:12)
at zy.a1.run(DispatchedTask.kt:124)
at zy.j1.Q0(EventLoop.common.kt:16)
at zy.b1.e(DispatchedTask.kt:28)
at zy.b1.a(DispatchedTask.kt:48)
at zy.p.u(CancellableContinuationImpl.kt:8)
at zy.p.F(CancellableContinuationImpl.kt:3)
at bz.c.B(BufferedChannel.kt:8)
at bz.c.u(BufferedChannel.kt:1)
at bz.b$a.i(BufferedChannel.kt:27)
at bz.b.M0(BufferedChannel.kt:66)
at bz.b.S0(BufferedChannel.kt:53)
at bz.b.D(BufferedChannel.kt:1)
at bz.b.j(BufferedChannel.kt:87)
at bz.e.j(Unknown Source:2)
at com.mapbox.maps.plugin.locationcomponent.DefaultLocationProvider$1.invokeSuspend$lambda$1(DefaultLocationProvider.kt:3)
at com.mapbox.maps.plugin.locationcomponent.DefaultLocationProvider$1.i(Unknown Source:0)
at com.mapbox.maps.plugin.locationcomponent.a.run(Unknown Source:2)
at com.mapbox.common.location.GoogleDeviceLocationProvider$getLastLocation$1$1$1$1.invoke(GoogleDeviceLocationProvider.kt:2)
at com.mapbox.common.location.GoogleDeviceLocationProvider$getLastLocation$1$1$1$1.invoke(GoogleDeviceLocationProvider.kt:1)
at com.mapbox.common.location.BaseDeviceLocationProvider$LocationCancelable.invokeIfNotCanceled(BaseDeviceLocationProvider.kt:24)
at com.mapbox.common.location.GoogleDeviceLocationProvider$getLastLocation$1$1.invoke$lambda$0(GoogleDeviceLocationProvider.kt:16)
at com.mapbox.common.location.GoogleDeviceLocationProvider$getLastLocation$1$1.a(Unknown Source:0)
at com.mapbox.common.location.n.run(Unknown Source:6)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)`


**Flutter Doctor**

`[✓] Flutter (Channel stable, 3.19.5, on macOS 13.6 22G120 darwin-arm64, locale
en-CL)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.82.2)
[✓] VS Code (version 1.68.1)
[✓] Connected device (4 available)
[✓] Network resources`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the crash on Flutter 3.19.5 while location updates animate the puck, then inspect MapboxStyleManager.kt and ModelSourceWrapper.kt around setStyleSourceProperty and updateProperty. Trace the malformed style-source property reported at the native boundary; done means location updates no longer produce the parse-error crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.