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.

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

@zugaldia

Description

@zugaldia

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

Metadata

Metadata

Assignees

Labels

AndroidMapbox Maps SDK for AndroidCoreThe cross-platform C++ core, aka mbgl

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions