mapbox / mapbox-maps-android

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL.
https://www.mapbox.com/mobile-maps-sdk
Other
475 stars 133 forks source link

Caused by java.lang.IllegalStateException Maximum limit of concurrent alarms 500 reached for uid: u0a359 #1533

Closed dh-hasif closed 2 years ago

dh-hasif commented 2 years ago

Environment

Observed behavior and steps to reproduce

We are seeing crash in Map SDK v10 ,for some users

Caused by java.lang.IllegalStateException Maximum limit of concurrent alarms 500 reached for uid: u0a359

android.os.Parcel.createExceptionOrNull (Parcel.java:2397)

android.app.AlarmManager.setInexactRepeating (AlarmManager.java:814) com.mapbox.android.telemetry.AlarmSchedulerFlusher.schedule (AlarmSchedulerFlusher.java:43) com.mapbox.android.telemetry.MapboxTelemetry.startAlarm (MapboxTelemetry.java:401) com.mapbox.android.telemetry.MapboxTelemetry.startTelemetry (MapboxTelemetry.java:393) com.mapbox.android.telemetry.MapboxTelemetry.enable (MapboxTelemetry.java:133) com.mapbox.maps.module.telemetry.MapTelemetryImpl.setUserTelemetryRequestState (MapTelemetryImpl.kt:74)

Actually we are trying to enable or disable telemetry based on the user preference as given below

subscriptions += mapboxMetricsEnabledDataSource.observe().subscribe { enabled -> val telemetry = mapView.attribution.getMapAttributionDelegate().telemetry() telemetry.setUserTelemetryRequestState(enabled) } This issue is not reproducible directly . But we can see crash logs from crashlytics for some users

Expected behavior

ZiZasaurus commented 2 years ago

@dh-hasif thank you for reporting. Can you please verify whether you are experiencing this on our latest stable version, 10.6.0?

dh-hasif commented 2 years ago

sure, I can verify this after updating to 10.6.0

dh-hasif commented 2 years ago

We have updated the Mapbox SDK to 10.7.0 and this issue is not occurring anymore. closing this ticket , thanks