microg / microg/GmsCore

[com.driveby.app] MILES freezes with ANR in MicroG Maps renderer during login

Open
#3,810 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
14.6k
Forks
3.2k
Avg merge
12d 11h
Merged PRs (30d)
4

Description

**Affected app**
Name: MILES Carsharing
Package id: com.driveby.app

**Describe the bug**
MILES freezes during the login flow on CalyxOS. The app remains visible but
stops processing touch input. Android reports an Application Not Responding
(ANR) after several seconds.

The UI thread is blocked in the MicroG Google Maps compatibility layer while
the Mapbox-based map renderer is being reset during a React Native screen
transition.

**To Reproduce**
Steps to reproduce the behavior:
1. Launch MILES.
2. Open the login flow.
3. Enter the login information and continue.
4. Wait several seconds.
5. The app freezes and stops responding to touch input.

The issue is reproducible. The device has recorded multiple earlier ANRs for
the same app and activity.

**Expected behavior**
The login screen should open and remain responsive when the map view is
paused, detached, or recreated.

**Screenshots**
No screenshot attached. The Android ANR dialog identifies
`com.driveby.app/.MainActivity` as not responding.

**System**
Android Version: 16
Custom ROM: CalyxOS
Device: Google Pixel 8a (`akita`)
Build: `BP4A.260205.001/14624666`

**microG**
microG Core version: `0.3.16.252432-25 (5f1e681)`
microG Self-Check results: All items ticked.

**Additional context**
MILES version: `4.46` (`versionCode 210680`)
CalyxOS WebView: `org.calyxos.webview 151.0.7922.173`

The captured ANR occurred on 2026-09-17 at 08:21:47 local time. Android
reported:

```text
Input dispatching timed out (com.driveby.app/com.driveby.app.MainActivity
is not responding. Waited 5000ms for MotionEvent)
```

The main thread stack from the ANR trace was:

```text
"main" prio=5 tid=1 Native
native: pthread_cond_wait
native: libmapbox-gl.so
mbgl::android::MapRenderer::onRendererReset
at com.mapbox.mapboxsdk.maps.renderer.MapRenderer.nativeReset(Native method)
at com.mapbox.mapboxsdk.maps.renderer.glsurfaceview.MapboxGLSurfaceView.onDetachedFromWindow
at com.google.android.gms.maps.zzah.onCreate
at com.google.android.gms.maps.MapView.onCreate
at com.rnmaps.maps.MapView.onCreate
at com.swmansion.rnscreens.ScreenContainer.onUpdate
at com.facebook.react.fabric.FabricUIManager$DispatchUIFrameCallback.doFrameGuarded
at android.view.Choreographer.doFrame
at android.os.Looper.loop
```

Before the ANR, MicroG Maps also logged:

```text
GmsMapAbstractPolygon: java.lang.IllegalArgumentException:
fromIndex(2) > toIndex(1)
at org.microg.gms.maps.mapbox.model.AbstractPolygon.setHoles(Polygon.kt:76)
at com.rnmaps.maps.MapPolygon.setHoles(MapPolygon.java:108)
```

The app also logged:

```text
libEGL: call to OpenGL ES API with no current context
```

The same `MapRenderer.onRendererReset` stack appeared in five earlier MILES
ANRs on this device. Fine and coarse location permissions were temporarily
revoked and the app was relaunched; the same map initialization and freeze
still occurred.

There was no fatal Java exception from the login/authentication flow. Network
threads remained active while the UI thread was blocked in the Maps renderer.

Please investigate the MicroG Maps/Mapbox renderer deadlock or renderer-reset
handling when a Google Maps `MapView` is detached and recreated by a React
Native application. The `setHoles()` list-index exception may be a related
trigger.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the renderer-reset stack involving MapRenderer.nativeReset, MapboxGLSurfaceView.onDetachedFromWindow, and MapView.onCreate. Then inspect org.microg.gms.maps.mapbox.model.AbstractPolygon.setHoles in Polygon.kt and MapPolygon.setHoles in MapPolygon.java alongside the reproduced login flow. Done means the MapView can be detached and recreated without the UI thread blocking or producing the reported setHoles exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, kotlin, react-native
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.