microg / microg/GmsCore

[com.citymapper.app.release] mapbox: pixelRatio may not be <= 0

Open
#3,238 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
14.6k
Forks
3.2k
Avg merge
12d 11h
Merged PRs (30d)
4

Description

Affected app
Name: Citymapper 11.46.1
Package id: com.citymapper.app.release

Describe the bug
App crashes when showing planned route.

To Reproduce
Steps to reproduce the behavior:

  1. Launch app
  2. Start planning a route by selecting a destination
  3. Click the green right arrow
  4. The app displays a list of suggested routes
  5. Click on any of the suggested routes
  6. The app force closes. Sometimes the app would show the route details fine, but selecting another suggested route would crash the app.

adb log:

01-19 11:49:13.948  5632  5632 I Module  : DeviceLockedStatusModuleProvider$Module.updateDeviceLockedStatus():103 repeatCheckTimes = 1, locked = false
01-19 11:49:13.950   680   680 D CompositionEngine: Layer: com.citymapper.app.release/com.citymapper.app.MainActivity#53366 had an out of bounds transparent region
01-19 11:49:13.950   680   680 D Region  :   Region transparentRegionHint (this=0xb400007d0558d610, count=1)
01-19 11:49:13.950   680   680 D Region  :     [  0, -957, 1080,  -5]
01-19 11:49:13.957  6007  6093 D ChimeraServiceProvider: serviceIntentCall: com.google.android.gms.common.telemetry.service.START -> Intent { act=com.google.android.gms.common.telemetry.service.START pkg=com.google.android.gms cmp=com.google.android.gms/org.microg.gms.common.ClientTelemetryService }
01-19 11:49:13.960  1747  2584 D BackgroundInstallControlService: Package event received: 0
01-19 11:49:13.964  6007  6007 D ClientTelemetryService: onBind: Intent { act=com.google.android.gms.common.telemetry.service.START pkg=com.google.android.gms cmp=com.google.android.gms/org.microg.gms.common.ClientTelemetryService }
01-19 11:49:13.965 20539 20539 D AndroidRuntime: Shutting down VM
01-19 11:49:13.965 20539 20539 E AndroidRuntime: FATAL EXCEPTION: main
01-19 11:49:13.965 20539 20539 E AndroidRuntime: Process: com.citymapper.app.release, PID: 20539
01-19 11:49:13.965 20539 20539 E AndroidRuntime: java.lang.Error: pixelRatio may not be <= 0
01-19 11:49:13.965 20539 20539 E AndroidRuntime:        at com.mapbox.mapboxsdk.maps.NativeMapView.nativeAddImages(Native Method)
01-19 11:49:13.965 20539 20539 E AndroidRuntime:        at com.mapbox.mapboxsdk.maps.NativeMapView.addImages(NativeMapView.java:951)
01-19 11:49:13.965 20539 20539 E AndroidRuntime:        at com.mapbox.mapboxsdk.maps.Style.addImage(Style.java:378)
01-19 11:49:13.965 20539 20539 E AndroidRuntime:        at com.mapbox.mapboxsdk.maps.Style.addImage(Style.java:318)
01-19 11:49:13.965 20539 20539 E AndroidRuntime:        at org.microg.gms.maps.mapbox.model.BitmapDescriptorFactoryImpl$registerBitmap$2$1.invoke(BitmapDescriptorFactory.kt:124)
01-19 11:49:13.965 20539 20539 E AndroidRuntime:        at org.microg.gms.maps.mapbox.model.BitmapDescriptorFactoryImpl$registerBitmap$2$1.invoke(BitmapDescriptorFactory.kt:123)
01-19 11:49:13.965 20539 20539 E AndroidRuntime:        at org.microg.gms.maps.mapbox.GoogleMapKt.runOnMainLooper$lambda$1(GoogleMap.kt:75)
01-19 11:49:13.965 20539 20539 E AndroidRuntime:        at org.microg.gms.maps.mapbox.GoogleMapKt.$r8$lambda$dW2FHIi0lKJIyIsMsDPgDPffCCc(Unknown Source:0)
01-19 11:49:13.965 20539 20539 E AndroidRuntime:        at org.microg.gms.maps.mapbox.GoogleMapKt$$ExternalSyntheticLambda0.run(Unknown Source:2)
01-19 11:49:13.965 20539 20539 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:991)
01-19 11:49:13.965 20539 20539 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:102)
01-19 11:49:13.965 20539 20539 E AndroidRuntime:        at android.os.Looper.loopOnce(Looper.java:232)
01-19 11:49:13.965 20539 20539 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:317)
01-19 11:49:13.965 20539 20539 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:8934)
01-19 11:49:13.965 20539 20539 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
01-19 11:49:13.965 20539 20539 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
01-19 11:49:13.965 20539 20539 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)

Expected behavior
Shows the route details

System
Android Version: 15
Custom ROM: LineageOS 22.2

microG
microG Core version: 0.3.11.250932
microG Self-Check results: All except: search for accounts, show notifications, interact with work profile

Additional context
Citymapper versions from the past 2 months have the same issue.

Contributor guide

No contributing guide indexed for this repository

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 in BitmapDescriptorFactory.kt at registerBitmap, then trace the call into Style.addImage and NativeMapView.addImages shown in the stack trace. Reproduce the route-selection sequence on Android 15 and verify that selecting suggested routes displays route details without the pixelRatio crash.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.