You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
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:
Show the POIs map
Hide it to show the bottom sheet without issue
Show the bottom sheet map
Show the two together
Crash
Show the POIs map
Show the bottom sheet map
The background map is drawn over the bottom sheet one
Hide and show the bottom sheet map
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)
[...]
The instant crash is gone. The rendering of the background map is still occurring on top of the bottom sheet one.
The issue here is that the overlapping SurfaceViews are fighting for the z order and the underlying surfaceview wins. There are two workarounds:
Make the bottom use a texture view (this can be enabled through xml or MapboxMapOptions)
- set Z order on top for the surfaceview in the bottom fragment drawer by ((SurfaceView) mapview.findViewById(R.id.surfaceView)).setZorderOnTop(true)
@mesnault can you post a full stacktrace of that second crash?
adding here that 5.1.1 has shipped. I'm working now on reproducing the issue in #9534 (comment) but haven't been able to do so. To harden against future regressions I'm adding a similar setup to our testapp as shown in OP. Could you give some pointers on how yours setup differs from the setup in in #9592? This would help with reproducing.
Activity
tobrun commentedon Jul 18, 2017
PR addressing this issue in #9538, would you be able to retest this with an upcoming 5.1.1 release?
tobrun commentedon Jul 19, 2017
The issue here is that the overlapping SurfaceViews are fighting for the z order and the underlying surfaceview wins. There are two workarounds:
xmlorMapboxMapOptions)- set Z order on top for the surfaceview in the bottom fragment drawer by
((SurfaceView) mapview.findViewById(R.id.surfaceView)).setZorderOnTop(true)@mesnault can you post a full stacktrace of that second crash?
tobrun commentedon Jul 24, 2017
adding here that 5.1.1 has shipped. I'm working now on reproducing the issue in #9534 (comment) but haven't been able to do so. To harden against future regressions I'm adding a similar setup to our testapp as shown in OP. Could you give some pointers on how yours setup differs from the setup in in #9592? This would help with reproducing.