mapbox / mapbox/mapbox-maps-android

[Bug] Black flickering on Android Auto and frame stuttering on mobile with Samsung Exynos/Mali devices (Exynos 9611/9820/9810) starting from Mapbox v11.21.0

Open
#2,722 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

## Environment

- Android OS version: Android 10, 11, 12
- Devices affected:
- Samsung Galaxy A51 (Exynos 9611 SoC, Mali-G72 GPU)
- Samsung Galaxy S10 / S10+ (Exynos 9820/9825 SoC, Mali-G76 GPU)
- Samsung Galaxy S9 / S9+ / Note 9 (Exynos 9810 SoC, Mali-G72 GPU)
- Maps SDK Version:
- **Affected Configuration (With Flickering/Stuttering):**
```kotlin
val mapBoxVersion = "11.21.0"
implementation("com.mapbox.maps:android-ndk27:$mapBoxVersion")
implementation("com.mapbox.extension:maps-androidauto-ndk27:$mapBoxVersion")
```
- **Working Configuration (No Flickering/Stuttering):**
```kotlin
val mapBoxVersion = "11.3.0"
implementation("com.mapbox.maps:android:$mapBoxVersion")
implementation("com.mapbox.extension:maps-androidauto:$mapBoxVersion")
```

## Observed behavior and steps to reproduce

### Observed behavior:
- **On Android Auto Projection (Car Screen):** The MapView continuously flashes/flickers black during user interaction (zoom, drag, rotation) or whenever there are GPS location updates. Framebuffer synchronization with Android Auto's virtual display/video encoder appears broken.
- **On Standalone Mobile Device Screen:** The map does not flash black, but experiences significant performance degradation, micro-stutters, and frame drops during map interactions.

### Steps to reproduce:
1. Initialize a Mapbox `MapView` with the default configuration on Mapbox SDK `11.21.0-ndk27`.
2. Connect one of the affected Samsung devices to an Android Auto Head Unit (or DHU simulator).
3. Pan, zoom, or drag the map.
4. Observe continuous heavy black flashing on the Car Screen, and frame stutters on the Mobile Screen.

## Expected behavior

The MapView should render smoothly at 30 FPS without any black flashing on Android Auto or stuttering on mobile screens on all Samsung devices using Exynos chipsets and ARM Mali GPUs.

## Notes / preliminary analysis

- The bug is highly correlated with the transition to **Android NDK r27** which enforces **16 KB memory page size alignment** in newer Mapbox v11 releases (specifically the `-ndk27` variants of the SDK and Android Auto extension).
- The older ARM Mali GPU drivers (Mali-G72, Mali-G76) running on 4 KB page size kernels seem to struggle with memory page allocation and sync fences in virtual display environments (Android Auto projections), which breaks the video encoder pipeline. On the local screen, it manifests as pipeline stalls leading to visual stutters.

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 issue with Mapbox 11.21.0-ndk27 and the working 11.3.0 configuration on an affected Exynos/Mali device, both on Android Auto and the mobile screen. Compare rendering during pan, zoom, drag, rotation, and location updates, then inspect the MapView and Android Auto integration paths using traces or video evidence. Done means smooth rendering without black flicker or frame stutter.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.