Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Overlapping map views rendering crashes #9534

@ghost

Description

In our current application, the user can see POIs around a location with a listing or a map. He can also select the location around which he wants to see POIs using a map in a bottom sheet.

Because of this, we may have two maps visible on screen and they can overlap. This triggers some weird rendering issues where the data of the background map is drawn over the bottom sheet one, and eventually the app crashes.

Here are two walkthrough in our app to explain the context and how the issue occurs:

Walkthrough 1

  1. Show the POIs map
  2. Hide it to show the bottom sheet without issue
  3. Show the bottom sheet map
  4. Show the two together
  5. Crash

Walkthrough 2

  1. Show the POIs map
  2. Show the bottom sheet map
  3. The background map is drawn over the bottom sheet one
  4. Hide and show the bottom sheet map
  5. Crash

Here is the stacktrace:

E/AndroidRuntime: FATAL EXCEPTION: main
                                                                       Process: our.app.package, PID: 26446
                                                                       java.lang.Error: eglSwapBuffers() failed
                                                                           at com.mapbox.mapboxsdk.maps.NativeMapView.nativeRender(Native Method)
                                                                           at com.mapbox.mapboxsdk.maps.NativeMapView.render(NativeMapView.java:179)
                                                                           at com.mapbox.mapboxsdk.maps.MapView.onDraw(MapView.java:407)
                                                                           at android.view.View.draw(View.java:17185)
                                                                           at android.view.View.updateDisplayListIfDirty(View.java:16167)
                                                                           at android.view.View.draw(View.java:16951)
                                                                           at android.view.ViewGroup.drawChild(ViewGroup.java:3727)
                                                                           at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3513)
                                                                           [...]

This seems related to #6647 and maybe #8725

Device:

Android 7.1.2
Nexus 5X

Mapbox SDK version:

Mapbox 5.0.1, upgraded to 5.1.0 and still getting crashes

Steps to trigger behavior

  1. Have a map view
  2. Open a bottom sheet containing another map view on top of the other one

Expected behavior

The bottom sheet map view should render above the other one without problem.

Actual behavior

The map view in the background is rendered on top of the bottom sheet one and the app crashes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AndroidMapbox Maps SDK for Android

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions