Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS map stops drawing - "Too many active WebGL contexts" despite .remove() #5585

Closed
wthorp opened this issue Nov 2, 2017 · 1 comment
Closed
Labels
needs investigation 🔍 Issues that require further research (e.g. it's not clear whether it's GL JS or something else)

Comments

@wthorp
Copy link

wthorp commented Nov 2, 2017

I have a single page application which has one main map, and also frequently displays new pages with smaller maps on them. When I close these pages, I call .remove() against these smaller maps.

When using iOS Safari or iOS chrome (iPhone SE), after ~15 new pages are opened, the main map no longer renders. I'm quite sure this is related to #2656 "Too many active WebGL contexts." The same behavior happens on desktop Chrome if you neglect to call "remove()".

See example here: https://jsfiddle.net/bill3000/mpLkqcdz/1/

mapbox-gl-js version v0.41.0:

Steps to Trigger Behavior

  1. create a map
  2. .remove() the map
  3. repeat ~15x

Expected Behavior

First map always renders

Actual Behavior

First map ceases to render

I've read #2656, but I'm curious if there aren't orthogonal solutions. Can you use the same WebGL context across all maps? Can you "detach" and "reattach" a map from the DOM to reuse a WebGL context?

@wthorp wthorp changed the title iOS map stop drawing - "Too many active WebGL contexts" despite .remove() iOS map stops drawing - "Too many active WebGL contexts" despite .remove() Nov 2, 2017
@mourner mourner added the needs investigation 🔍 Issues that require further research (e.g. it's not clear whether it's GL JS or something else) label Mar 15, 2018
@mourner
Copy link
Member

mourner commented Aug 1, 2018

It seems that there's nothing we can do on the GL JS side to help with this browser limitation, so I'm going to close. Will reopen on any suggested solutions.

@mourner mourner closed this as completed Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation 🔍 Issues that require further research (e.g. it's not clear whether it's GL JS or something else)
Projects
None yet
Development

No branches or pull requests

2 participants