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

Render exception when there is another Surface that also calls eglMakeCurrent #8725

Closed
zugaldia opened this issue Apr 12, 2017 · 0 comments
Closed
Assignees
Labels
Android Mapbox Maps SDK for Android Core The cross-platform C++ core, aka mbgl

Comments

@zugaldia
Copy link
Member

If an activity includes another Surface that also calls eglMakeCurrent() the app shows a number of EGL_BAD_DISPLAY crashes with the following exception on the Java side:

Caused by: java.lang.Error: eglSwapBuffers() failed
at com.mapbox.mapboxsdk.maps.NativeMapView.nativeRender(Native Method)
at com.mapbox.mapboxsdk.maps.NativeMapView.render(SourceFile:177)

This seems to be due to not resetting the firstRender flag in native_map_view.cpp. Resetting it to true on destroySurface() fixes it.

Additionally, we don't have any test activities with another (GL) surface to test this situation. We should add a new one to the Test App.

Possibly related: #6647.

cc: @ivovandongen @tobrun

@zugaldia zugaldia added Android Mapbox Maps SDK for Android Core The cross-platform C++ core, aka mbgl labels Apr 12, 2017
@tobrun tobrun added this to the android-v5.1.0 milestone Apr 19, 2017
@tobrun tobrun self-assigned this Apr 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android Core The cross-platform C++ core, aka mbgl
Projects
None yet
Development

No branches or pull requests

2 participants