-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
Enable crash mitigation when running OpenGL in the Android emulator #2858
Conversation
for more information, see https://pre-commit.ci
Bloaty Results 🐋Compared to main
Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-2858-compared-to-main.txtCompared to d387090 (legacy)
Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-2858-compared-to-legacy.txt |
Benchmark Results ⚡
Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/benchmark-results/pr-2858-compared-to-main.txt |
Bloaty Results (iOS) 🐋Compared to main
Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results-ios/pr-2858-compared-to-main.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried it out, and it seems to resolve the simulator crashing!
In the Android Open Source Project, there exists a translation layer that sits between an OpenGL client application and the driver, called Goldfish. For whatever reason, MapLibre's OpenGL backend crashes Goldfish inside
GL2Encoder::s_glDrawElements
. The following mitigation addresses this crash by first detecting if we're in an emulated environment and then deleting all drawables every frame. The crash appears to be related to buffer re-use, but I've yet to locate a minimum reproduction sample that triggers this crash.Just deleting all drawables every frame and rebuilding them works around the reuse problem, at the cost of emulator performance. It sure beats crashing though.
Closes #2791