mapbox-maps-android icon indicating copy to clipboard operation
mapbox-maps-android copied to clipboard

TextureView rendering: map may be not loaded after bringing back to front

Open kiryldz opened this issue 4 years ago • 1 comments

Environment

  • Android OS version: 12
  • Devices affected: Samsung S20 Ultra
  • Maps SDK Version: v10.5.0-beta.1

Observed behavior and steps to reproduce

Run TextureViewActivity from examples app. Minimize / maximize app, at some point after maximizing no map is rendered - it will render properly if you drag a map. This issue is not deterministic.

Expected behavior

Map should be always rendered after maximizing an app.

Notes / preliminary analysis

Additional links and references

https://user-images.githubusercontent.com/15800566/162171807-8a59cd88-3820-45a2-9cbf-86a612edd5d7.mp4

kiryldz avatar Apr 07 '22 09:04 kiryldz

Root cause is that if mimimize / maximize fast enough - Activity.onStart() or Fragment.onStart() are simply not called and we do not hit MapboxRenderThread.resume(). In comparison with surface rendering mode map is not loaded because for texture mode we clear all EGL which was done for https://github.com/mapbox/mapbox-maps-android/issues/607.

kiryldz avatar Apr 07 '22 10:04 kiryldz