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

tileStore.loadTileRegion JNI ERROR (app bug): global reference table overflow (max=51200)global reference table dump #2267

Closed D10NGYANG closed 7 months ago

D10NGYANG commented 9 months ago

Environment

MyCode

class MainActivity : ComponentActivity() {
    @OptIn(MapboxExperimental::class)
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        lifecycleScope.launch {
            PermissionManager.request(arrayOf(
                Manifest.permission.ACCESS_COARSE_LOCATION,
                Manifest.permission.ACCESS_FINE_LOCATION
            )).let {
                if (it) {
                    LocationStatusManager.start()
                }
            }
        }
        lifecycleScope.launch {
            LocationStatusManager.statusFlow.collect {
                println("Location: ${it?.longitude}, ${it?.latitude}")
            }
        }
        setContent {
            MapboxDemoTheme {
                Column(
                    modifier = Modifier.fillMaxSize()
                ) {
                    MapboxMap(
                        Modifier.fillMaxSize().weight(1f),
                        mapInitOptionsFactory = { context ->
                            MapInitOptions(
                                context,
                                styleUri = "mapbox://styles/mapbox/streets-v11",
                            )

                        },
                        mapViewportState = MapViewportState().apply {
                            setCameraOptions {
                                zoom(12.0)
                                center(Point.fromLngLat(113.239945, 23.028863))
                                pitch(0.0)
                                bearing(0.0)
                            }
                        },
                        locationComponentSettings = LocationComponentSettings.Builder(
                            DefaultSettingsProvider.createDefault2DPuck(withBearing = true)
                        )
                            .setEnabled(true)
                            .setPuckBearing(PuckBearing.COURSE)
                            .build(),
                    ) 

                    Button(onClick = {
                        val offlineManager = OfflineManager()

                        val tilesetDescriptor = offlineManager.createTilesetDescriptor(
                            TilesetDescriptorOptions.Builder()
                                .styleURI(Style.STANDARD)
                                .minZoom(0)
                                .maxZoom(16)
                                .build()
                        )
                        val polygon = Polygon.fromLngLats(
                            listOf(
                                listOf(
                                    Point.fromLngLat(113.046982,23.250149),
                                    Point.fromLngLat(113.044897,23.252215),
                                    Point.fromLngLat(113.050742,23.259498),
                                    Point.fromLngLat(113.050923,23.263302),
                                    // ... more points
                                )
                            )
                        )
                        val tileRegionLoadOptions = TileRegionLoadOptions.Builder()
                            .geometry(polygon)
                            .descriptors(listOf(tilesetDescriptor))
                            .metadata(Value("佛山"))
                            .acceptExpired(false)
                            .networkRestriction(NetworkRestriction.NONE)
                            .build()

                        val tileStore = TileStore.create()
                        val tileRegionCancelable = tileStore.loadTileRegion(
                            "foshan",
                            tileRegionLoadOptions,
                            { progress ->
                                println("下载进度:$progress")
                            }
                        ) { expected ->
                            if (expected.isValue) {
                                // Tile region download finishes successfully
                                expected.value?.let {
                                    println("下载完成,$it")
                                }
                            }
                            expected.error?.let {
                                // Handle errors that occurred during the tile region download.
                                println("error: ${it}")
                            }
                        }
                    }) {
                        Text(text = "下载")
                    }
                }
            }
        }
    }

    override fun onDestroy() {
        LocationStatusManager.stop()
        super.onDestroy()
    }
}

LOG

2024-01-29 15:56:41.527 22328-22404                  I  下载进度:[completedResourceCount: 375, completedResourceSize: 185526371, erroredResourceCount: 0, requiredResourceCount: 514, loadedResourceCount: 139, loadedResourceSize: 185526371]
2024-01-29 15:56:42.272 22328-22467 idou.mapboxdem   A  java_vm_ext.cc:666] JNI ERROR (app bug): global reference table overflow (max=51200)global reference table dump:
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]   Last 10 entries (of 51200):
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]     51199: 0x145a1ba0 java.lang.ref.WeakReference (referent is a com.mapbox.common.Buffer)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]     51198: 0x145a1b00 java.lang.ref.WeakReference (referent is a com.mapbox.bindgen.DataRef)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]     51197: 0x145a1a28 java.lang.ref.WeakReference (referent is a com.mapbox.common.Buffer)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]     51196: 0x145a1988 java.lang.ref.WeakReference (referent is a com.mapbox.bindgen.DataRef)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]     51195: 0x145a18b0 java.lang.ref.WeakReference (referent is a com.mapbox.common.Buffer)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]     51194: 0x145a1810 java.lang.ref.WeakReference (referent is a com.mapbox.bindgen.DataRef)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]     51193: 0x145a1738 java.lang.ref.WeakReference (referent is a com.mapbox.common.Buffer)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]     51192: 0x145a1698 java.lang.ref.WeakReference (referent is a com.mapbox.bindgen.DataRef)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]     51191: 0x145a15c0 java.lang.ref.WeakReference (referent is a com.mapbox.common.Buffer)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]     51190: 0x145a1520 java.lang.ref.WeakReference (referent is a com.mapbox.bindgen.DataRef)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]   Summary:
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]     49213 of java.lang.ref.WeakReference (49213 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]       830 of java.lang.Class (721 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]       762 of com.mapbox.common.module.okhttp.HttpCallback$ResponseReadStream (381 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]       306 of java.nio.DirectByteBuffer (306 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         5 of com.mapbox.maps.text.LocalGlyphRasterizer (5 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         3 of com.mapbox.maps.StyleObserver (1 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         3 of java.lang.String (2 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         3 of android.opengl.EGLSurface (2 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         3 of android.opengl.EGLContext (2 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         3 of android.opengl.EGLDisplay (2 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         3 of android.app.LoadedApk$ReceiverDispatcher$InnerReceiver (3 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of com.mapbox.maps.renderer.MapboxSurfaceHolderRenderer (1 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of com.mapbox.common.LifecycleMonitorAndroid (1 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of com.mapbox.common.battery.AndroidBatteryMonitor (1 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of com.mapbox.common.movement.AndroidMovementMonitor (1 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of com.mapbox.common.Reachability (1 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of com.mapbox.common.location.LocationServiceImpl (1 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of com.mapbox.common.module.okhttp.MapboxOkHttpService$HttpServiceOfflineSwitchObserver (1 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of com.mapbox.common.Reachability$ReachabilityOfflineSwitchObserver (1 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of com.mapbox.common.module.okhttp.MapboxOkHttpService (1 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of com.mapbox.common.location.AndroidDeviceLocationProvider (1 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of dalvik.system.PathClassLoader (1 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of android.telephony.TelephonyManager$DeathRecipient (1 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of com.mapbox.bindgen.DataRef (2 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of java.lang.ThreadGroup (2 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of java.lang.reflect.Method (2 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of android.app.LoadedApk$ServiceDispatcher$InnerConnection (2 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of android.database.ContentObserver$Transport (2 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of android.os.Binder (2 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of android.os.Handler$MessengerImpl (2 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         2 of android.location.LocationManager$ListenerTransport (2 unique instances)
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of huawei.android.security.HwBehaviorCollectManagerImpl$2
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of huawei.android.security.HwBehaviorCollectManagerImpl$AppClientMonitor
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of com.huawei.hwaps.EventAnalyzed$ApsManagerServiceCallback
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of com.mapbox.maps.plugin.scalebar.ScaleBarPluginImpl$$ExternalSyntheticLambda0
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of com.mapbox.maps.MapController$$ExternalSyntheticLambda1
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of com.mapbox.maps.MapController$$ExternalSyntheticLambda2
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of com.hailiao.beidou.mapboxdemo.ComposableSingletons$MainActivityKt$lambda-3$1$1$3$$ExternalSyntheticLambda0
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of com.hailiao.beidou.mapboxdemo.ComposableSingletons$MainActivityKt$lambda-3$1$1$3$$ExternalSyntheticLambda1
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of com.mapbox.common.module.okhttp.MapboxOkHttpService$$ExternalSyntheticLambda4
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of com.mapbox.common.LifecycleService$Binder
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of com.mapbox.maps.extension.compose.internal.MapboxMapNode$$ExternalSyntheticLambda0
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of java.util.Locale
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of java.text.RuleBasedCollator
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of dalvik.system.VMRuntime
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of android.graphics.HardwareRenderer$ProcessInitializer$1
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of android.view.inputmethod.InputMethodManager$ControlledInputConnectionWrapper
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of android.view.WindowManagerGlobal$1
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of android.content.ContentProvider$Transport
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of android.view.ViewRootImpl$W
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of android.hardware.display.DisplayManagerGlobal$DisplayManagerCallback
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of android.view.accessibility.AccessibilityManager$1
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of android.view.inputmethod.InputMethodManager$1
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of android.app.ActivityThread$ApplicationThread
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of android.content.res.AssetManager
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of android.os.PersistableBundle$1
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666]         1 of huawei.android.security.HwBehaviorCollectManagerImpl$InnerAppObserver
2024-01-29 15:56:42.272 22328-22467                  A  java_vm_ext.cc:666] 
2024-01-29 15:56:42.481 22328-22467                  A  runtime.cc:667] Runtime aborting...
2024-01-29 15:56:42.481 22328-22467                  A  runtime.cc:667] All threads:
2024-01-29 15:56:42.481 22328-22467                  A  runtime.cc:667] DALVIK THREADS (52):
2024-01-29 15:56:42.481 22328-22467                  A  runtime.cc:667] "OkHttp https://api.mapbox.com/..." prio=5 tid=57 Runnable
2024-01-29 15:56:42.481 22328-22467                  A  runtime.cc:667]   | group="" sCount=0 dsCount=0 flags=0 obj=0x14ac69c8 self=0x7473abe800
2024-01-29 15:56:42.481 22328-22467                  A  runtime.cc:667]   | sysTid=22467 nice=0 cgrp=default sched=0/0 handle=0x742e9e1d50
2024-01-29 15:56:42.481 22328-22467                  A  runtime.cc:667]   | state=R schedstat=( 10057270244 2947081773 23677 ) utm=560 stm=445 core=5 HZ=100
2024-01-29 15:56:42.481 22328-22467                  A  runtime.cc:667]   | stack=0x742e8df000-0x742e8e1000 stackSize=1039KB
2024-01-29 15:56:42.481 22328-22467                  A  runtime.cc:667]   | held mutexes= "abort lock" "mutator lock"(shared held)
2024-01-29 15:56:42.481 22328-22467                  A  runtime.cc:667]   native: #00 pc 0000000000430570  /apex/com.android.runtime/lib64/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+140)
RealFictionFactory commented 8 months ago

Environment

I have exactly the same issue but slightly different case (multiple workers downloading different tile regions which may overlap, but I'm not sure if this is the real root cause). Crashes seem more random and not all devices seem to be affected. Currently I'm able to reproduce it on Pixel 6 with Android 14. I've tried other Android 14 devices (e.g. Galaxy Tab S6 Lite) and it works correctly. Also OnePlus 9 with Android 13 seem to work fine. Also some Lenovo tablet with Android 10 does not report crashes. I can post my crash log but it looks much more like above. Limit of 51200 references reached, Buffer and DataRef one after each other, etc.

Mapbox v11.1

kiryldz commented 8 months ago

@RealFictionFactory

  1. Can you reproduce it on Pixel 6 stably or does it also happen randomly?
  2. Is your application in foreground or in background when the crash happens?
RealFictionFactory commented 8 months ago

@kiryldz

  1. The issue is reproductable on Pixel 6 and Pixel 7a both with Android 14 let's say in 80+% of cases. There are some cases when it does not crash but it happens very rarely.
  2. The app is in foreground.
kiryldz commented 8 months ago

@RealFictionFactory are you also using Jetpack Compose as in the code in issue description?

RealFictionFactory commented 8 months ago

@kiryldz Nope. We launched several CoroutineWorkers (in the main dispatcher of course) that download several tile regions. It does not matter if Workers are launched in groups or as unique jobs. Usually, it crashes on downloading the tile region that contains most of the points. So far we had no crashes when downloading only one tile region but maybe it depends on how many points it contains and the area those points cover.

RealFictionFactory commented 8 months ago

Some additional notes. Maybe this will help.

It doesn't matter if I do loadStylePack before or not (just loadTiles, like in example from the first post).

Sometimes I can see warnings with HTTP 429 statuses from Mapbox and sometimes not when crash happens so delay because of that should not have an impact on crash.

This is Geometry for which tile region is downloaded and crashes:

MultiPoint{type=MultiPoint, bbox=null, coordinates=[Point{type=Point, bbox=null, coordinates=[0.0, 0.0]}, Point{type=Point, bbox=null, coordinates=[14.436532, 35.826528]}, Point{type=Point, bbox=null, coordinates=[14.441787, 35.827686]}, Point{type=Point, bbox=null, coordinates=[14.511931, 35.89339]}, Point{type=Point, bbox=null, coordinates=[0.0, 0.0]}, Point{type=Point, bbox=null, coordinates=[14.509771, 35.896282]}, Point{type=Point, bbox=null, coordinates=[14.188232, 36.053514]}, Point{type=Point, bbox=null, coordinates=[14.493742, 35.915075]}, Point{type=Point, bbox=null, coordinates=[14.528094, 35.836536]}, Point{type=Point, bbox=null, coordinates=[0.0, 0.0]}, Point{type=Point, bbox=null, coordinates=[0.0, 0.0]}, Point{type=Point, bbox=null, coordinates=[139.78244, 35.699342]}, Point{type=Point, bbox=null, coordinates=[-72.5254412, -13.1547062]}, Point{type=Point, bbox=null, coordinates=[-72.2642679, -13.2583689]}, Point{type=Point, bbox=null, coordinates=[130.4415237, 33.665107]}, Point{type=Point, bbox=null, coordinates=[-85.8054879, 30.1765914]}, Point{type=Point, bbox=null, coordinates=[24.1056221, 56.9676941]}, Point{type=Point, bbox=null, coordinates=[22.0253844, 50.0310627]}, Point{type=Point, bbox=null, coordinates=[14.34312, 35.974713]}, Point{type=Point, bbox=null, coordinates=[14.397791, 35.880955]}, Point{type=Point, bbox=null, coordinates=[14.5127, 35.897837]}, Point{type=Point, bbox=null, coordinates=[21.8540812, 50.0171156]}, Point{type=Point, bbox=null, coordinates=[21.82, 50.009953]}, Point{type=Point, bbox=null, coordinates=[36.2636, 51.65764]}, Point{type=Point, bbox=null, coordinates=[20.764218, 39.645963]}, Point{type=Point, bbox=null, coordinates=[21.85, 50.018]}, Point{type=Point, bbox=null, coordinates=[22.7530111, 50.29954]}, Point{type=Point, bbox=null, coordinates=[22.0685343, 50.0146319]}, Point{type=Point, bbox=null, coordinates=[22.4937548, 50.0583341]}, Point{type=Point, bbox=null, coordinates=[21.9891106, 50.0186761]}, Point{type=Point, bbox=null, coordinates=[18.5984214, 53.0138191]}, Point{type=Point, bbox=null, coordinates=[22.0091208, 50.0496673]}, Point{type=Point, bbox=null, coordinates=[16.7382037, 53.1509859]}, Point{type=Point, bbox=null, coordinates=[17.0385548, 51.1078821]}, Point{type=Point, bbox=null, coordinates=[21.015462, 52.2291168]}, Point{type=Point, bbox=null, coordinates=[22.013293, 50.0284103]}]}

RealFictionFactory commented 8 months ago

I've created separate activity inside our project and it crashes on the following set of points (a bit more than above).

` class CrashTestActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_crash_test) mapboxOfflineTest() }

    private fun mapboxOfflineTest() {
        val offlineManager = OfflineManager()

        val tilesetDescriptor = offlineManager.createTilesetDescriptor(
            TilesetDescriptorOptions.Builder()
                .styleURI(Style.OUTDOORS)
                .minZoom(0)
                .maxZoom(16)
                .build()
        )

        val tileRegionLoadOptions = TileRegionLoadOptions.Builder()
            .geometry(createPoints())
            .descriptors(listOf(tilesetDescriptor))
            .acceptExpired(true)
            .networkRestriction(NetworkRestriction.NONE)
            .build()

        val tileStore = TileStore.create()

        val tileRegionCancelable = tileStore.loadTileRegion(
            "offlinecrashtest",
            tileRegionLoadOptions,
            { progress ->
                println("offline progress:$progress")
            }
        ) { expected ->
            if (expected.isValue) {
                // Tile region download finishes successfully
                expected.value?.let {
                    println("offline result,$it")
                }
            }
            expected.error?.let {
                // Handle errors that occurred during the tile region download.
                println("offline error: ${it}")
            }
        }
    }

    private fun createPoints(): Geometry {
        val pointList = listOf(
            Point.fromLngLat(18.7948147, 52.8790493),
            Point.fromLngLat(-82.6979351, 27.4652927),
            Point.fromLngLat(-86.902298, 32.3182314),
            Point.fromLngLat(-97.5164276, 35.4675602),
            Point.fromLngLat(-111.0937311, 39.3209801),
            Point.fromLngLat(-95.5377215, 29.6185669),
            Point.fromLngLat(-74.0059728, 40.7127753),
            Point.fromLngLat(-84.2700179, 37.8393332),
            Point.fromLngLat(-122.4194155, 37.7749295),
            Point.fromLngLat(-98.4945922, 29.4251905),
            Point.fromLngLat(18.7948147, 52.8790493),

            Point.fromLngLat(14.441787, 35.827686),
            Point.fromLngLat(14.509771, 35.896282),
            Point.fromLngLat(14.511931, 35.89339),
            Point.fromLngLat(14.528094, 35.836536),
            Point.fromLngLat(-7.9879296, 31.6329983),
            Point.fromLngLat(-72.2642679, -13.2583689),
            Point.fromLngLat(-72.5254412, -13.1547062),
            Point.fromLngLat(14.493742, 35.915075),
            Point.fromLngLat(-9.7959788, 31.3558178),
            Point.fromLngLat(14.436532, 35.826528),
            Point.fromLngLat(0.0, 0.0),
            Point.fromLngLat(-7.7632607, 31.3583253),
            Point.fromLngLat(0.0, 0.0),
            Point.fromLngLat(0.0, 0.0),
            Point.fromLngLat(130.4415237, 33.665107),
            Point.fromLngLat(-6.153352, 29.8056293),
            Point.fromLngLat(14.188232, 36.053514),
            Point.fromLngLat(-6.153352, 29.8056293),
            Point.fromLngLat(0.0, 0.0),
            Point.fromLngLat(25.4501846, 36.3831048),
            Point.fromLngLat(34.595581, 31.522694),
            Point.fromLngLat(139.78244, 35.699342),
            Point.fromLngLat(22.0253844, 50.0310627),
            Point.fromLngLat(14.34312, 35.974713),
            Point.fromLngLat(-6.153352, 29.8056293),
            Point.fromLngLat(22.0090041, 50.0495154),
            Point.fromLngLat(22.490404, 50.0558258),
            Point.fromLngLat(22.4905856, 50.0558821),
            Point.fromLngLat(22.0671666, 50.1143897),
            Point.fromLngLat(22.0049195, 50.037125),
            Point.fromLngLat(22.0050053, 50.0372421),
            Point.fromLngLat(21.9988924, 50.0421225),
            Point.fromLngLat(14.279725, 50.0801628),
            Point.fromLngLat(21.015462, 52.2291168),
            Point.fromLngLat(21.015462, 52.2291168),
            Point.fromLngLat(16.7382037, 53.1509859),
            Point.fromLngLat(16.1553263, 51.2069962),
            Point.fromLngLat(18.6326253, 54.4077955),
            Point.fromLngLat(21.0094913, 52.2490297),
            Point.fromLngLat(22.013293, 50.0284103)
        )
        return MultiPoint.fromLngLats(pointList)
    }
}

` Layout file used in the sample is an empty one provided by Android Studio when creating empty activity.

kiryldz commented 8 months ago

@RealFictionFactory thanks, I was just writing the comment asking you to provide reproducible code if possible 😄 . We'll take a look.

RealFictionFactory commented 8 months ago

I've realised there are several points duplicated in my sample. Removing duplicates and leaving only one copy of them did not helped. The crash still happens.

RealFictionFactory commented 8 months ago

Just to confirm, I've just created a clean Empty Views android project using Android Studio, then used exact code I pasted above and it crashes.

kiryldz commented 8 months ago

@RealFictionFactory FYI this was reproduced locally from our end, thanks for the code! We will take a look.

RealFictionFactory commented 8 months ago

@kiryldz Thank you for the information. Since the delay's affecting our release timeline and customer expectations, any idea when we can expect a fix? Would really appreciate an update.

kiryldz commented 8 months ago

@kiryldz Thank you for the information. Since the delay's affecting our release timeline and customer expectations, any idea when we can expect a fix? Would really appreciate an update.

@RealFictionFactory the fix is WIP and is expected in v11.3.0-rc.1 release coming out W13 (in 2 weeks).

kiryldz commented 7 months ago

This should be fixed in https://github.com/mapbox/mapbox-maps-android/releases/tag/v11.3.0-rc.1.

RealFictionFactory commented 7 months ago

@kiryldz Thanks. First quick tests show that it doesn't crash anymore.