mapbox / mapbox/mapbox-maps-android

Error: com.mapbox.common.Log in error

Open
#2,567 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :beetle:
Dominant language
Kotlin
Stars
578
Forks
161
PR merge metrics
No merged PRs in 30d

Description

## Environment

- Android OS version: 12
- Devices affected: 1
- Maps SDK Version: 11.8.1

## Observed behavior and steps to reproduce

java.lang.Error: std::bad_alloc
at com.mapbox.common.Log.error(SourceFile)
at com.mapbox.common.MapboxMapsAndroidLogger.internalLogE$sdk_base_release
at com.mapbox.maps.MapboxLogger.logE
at s.d
at fr1.i
at C01.c
at Mn0.invoke
at com.mapbox.maps.threading.AnimationThreadController.postOnMainThread
at gd.onAnimationUpdate
at android.animation.ValueAnimator.animateValue(ValueAnimator.java:1566)
at android.animation.ValueAnimator.animateBasedOnTime(ValueAnimator.java:1357)
at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1489)
at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:146)
at android.animation.AnimationHandler.access$100(AnimationHandler.java:37)
at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:54)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1035)
at android.view.Choreographer.doCallbacks(Choreographer.java:845)
at android.view.Choreographer.doFrame(Choreographer.java:775)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1022)
at android.os.Handler.handleCallback(Handler.java:978)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loopOnce(Looper.java:238)
at android.os.Looper.loop(Looper.java:357)
at android.app.ActivityThread.main(ActivityThread.java:8103)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1026)

## Expected behavior

No creashes

## Notes / preliminary analysis

We use MapBox to display a custom Map in the "Map" tab and also to create a static map image using `mapboxMap.getGesturesManager()?.removeStandardGestureListener()`

## Additional links and references

N/A

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

Start by reproducing the crash on Android 12 with Maps SDK 11.8.1, using the Map tab and the static map path that calls getGesturesManager()?.removeStandardGestureListener(). Trace the com.mapbox.common.Log.error stack through MapboxLogger.logE and AnimationThreadController.postOnMainThread, and document a reliable reproduction and verified fix for the std::bad_alloc failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
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.