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

Mapbox Vector Maps Crash on iOS 12.3 - arraybuffer memory leak is back #8282

Closed
femski opened this issue May 23, 2019 · 2 comments
Closed

Mapbox Vector Maps Crash on iOS 12.3 - arraybuffer memory leak is back #8282

femski opened this issue May 23, 2019 · 2 comments

Comments

@femski
Copy link

femski commented May 23, 2019

I am creating a new issue since previous one (Issue #4695) was closed recently after it seemed like array buffer leak issue in iOS Safari was fixed of iOS 12.2. Before this Safari was holding on to arraybuffers being passed between webworkers causing a memory overflow crash.
This caused widespread crashes in WebGL applications like mapbox (extrusions etc.).

Unfortunately, Mapbox crashes are back again in iOS 12.3. I tested my App and the example created by @ChrisLoer
https://measuredweighed.github.io/mapboxgl-js-mem-usage/arraybuffer-test.html

There is nothing for Mapbox to do here - we just have to aware of this bug and avoid iOS until Apple fixes webkit issue (rasters are ok - no crashes there).

Reopened the webkit ticket also:
https://bugs.webkit.org/show_bug.cgi?id=194268

cc @ChrisLoer @grorg

@femski femski changed the title Mapbox Vector Maps Crashe on IOS 12.3 - arraybuffer memory leak is back Mapbox Vector Maps Crash on iOS 12.3 - arraybuffer memory leak is back May 23, 2019
@ahk ahk added bug 🐞 needs discussion 💬 performance ⚡ Speed, stability, CPU usage, memory usage, or power usage and removed performance ⚡ Speed, stability, CPU usage, memory usage, or power usage labels May 29, 2019
@chloekraw
Copy link
Contributor

Thanks for taking the time to report this @femski and for reopening the WebKit ticket. It’s much appreciated; we’ll see if there’s something we can do on our side as well.

@femski
Copy link
Author

femski commented Aug 13, 2019

On further investigation I found that Arraybuffer memory leak in Safari referred in issue #4695 is indeed fixed. Well at least the workaround webkit team put forward is effective in preventing unbounded memory growth and resulting crash.

But my App continued to crash and reason for this was combination of high memory usage from my own application data and high memory usage of vector layers in mapbox GL-JS. So first I removed all application data and removed Hillshading layer and the App survived 5+ hour of stress test.

Next I compressed in-memory database with SQLite CEROD extension - to 1/3rd size and App (minus Hillshading) survived for extended time. Even now adding Hillshading causes crash. But at least my App is working for most part.

Overall, I think there is likely still is a problem with GL-JS on Safari (perhaps both has memory management issues) - but at least for maps without Hillshading, Extrusion etc - it works thanks for recent fixed in GL-JS and Webkit.

I am going to close this ticket since I don't think ArrayBuffer leak is at the core of this issue.

Perhaps separate issues can be opened once there is specific evidence of any memory mismanagement in Safari or GL-JS.

@femski femski closed this as completed Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants