-
-
Notifications
You must be signed in to change notification settings - Fork 330
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 Crash: Simulator Crash (glDrawElements) on custom style when camera is moved #268
Comments
I have the same problem since today – My style worked before, now it crashes. |
Yep, caused by iOS 15.4 Simulator. Similar issue has been posted on React wrapper for Mapbox issue tracker. 15.2 is still okay, but some investigation might be needed for future's sake. |
Thanks for opening this issue @racer1988.
|
@atierian Sorry for missing those details:
To our tests this is mostly due to 15.4 environment. I will report if I can see issues on other simulator versions |
Note:
I suppose the issue was already present with previous simulators versions. now it became a problem also on the default |
I'd really prefer this issue to be treated as critical 🤔 either to accelerate finding a fix or speeding up the Metal adoption. |
Thanks for the feeback @username0x0a It would be great to have more hands working on this. Do you think you would have time to help out? |
I don't want to panic prematurely 😓, but with Xcode 14 & iOS 16 Simulator, I'm getting an instant crash on launch, probably referencing something not going well in OS-level frameworks related to GL support. Running the framework works okay on a physical device (no red alert escalation needed), no matter when run on iOS 16 device from Xcode 13 or 14. But the Simulator issues & development will probably become more serious. 🔥 @wipfli I could help with what I'm capable of, yet I'm not really an OpenGL/Metal guy, so any ideas in these areas are a bit of a black magic unfortunately. I'll at least try to experiment with the UpdateThe Metal branch (at least a bit older checkout with some customisations for a project where I used Mapbox) works pretty fine in the iOS 15.5 & 16 Simulators (not even mentioning the HW acceleration, that's huuge); the crashes I experience with the regular framework do not appear there, so far so good. 👌 Seems like pushing forward the |
Thanks, @username0x0a |
I was able to replicate this using the test app Mapbox GL (scheme
sw_vers
# ProductName: macOS
# ProductVersion: 12.4
# BuildVersion: 21F79
uname -a
# Darwin oldSanJuan.local 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022;
# root:xnu-8020.121.3~4/RELEASE_X86_64 x86_64
xcodebuild -version
# Xcode 13.4.1
# Build version 13F100 Video paused to show the drawing defect in MapLibre GL Video to show the drawing defect in MapLibre GL 15.5-Simulator-480.mov |
There's a chance I've successfully rebased + updated the I expect iOS 16 to really be a breaker here (at least for the Simulator which still uses some shady rendering routines even if real devices work okay) so I hope it could be moved somewhere. 🙏 |
Thanks @username0x0a for the update. Feel free to also make a draft pull request to this repo with your changes... |
Related to #163 |
Is there any workaround? |
Getting also a BAD_ACCESS crash on my M1. Running XCode with Rosetta did not change anything.
|
@maxammann — See discussion at maplibre/maplibre-gl-native-distribution#7 I do not recommend configuring Rosetta for either Xcode nor the Simulator, but you may find helpful workaround at the link above. |
I'll try to create a public binary Swift package to use in the meantime 👍 – I need to use some somehow-hotfixed version, too. 😄 |
As the reporter of the issue, I would like to ask what is the plan of the community for this topic. These are the recollection of points from discussions in various thread and my assumptions:
My gut feeling tell me that in order for MapLibre to continue support emulators devices is to migrate the main branch to metal.
This is a open-source community project, but I would like to ask the main maintainers (eg: @wipfli @nvanfleet ) if there is any intention to pursue this in a structured way, or due to the difficulty of the Metal Native Port, is something that set on the side to find resources. (I unfortunately don't have sufficient knowledge of Metal to help with the issue itself) References: |
Lets discuss this next week in the technical steering meeting. |
Thanks for the summary @racer1988. I think that MapLibre GL Native will see substantial changes in the near future. Tonight we have an Advisory Council meeting with our sponsors and I will publish some meeting notes tomorrow probably. One big discussion topic will be how to move forward with Native... |
@wipfli Thank you for the info! |
@racer1988 — Thank you for the original issue report back in April 2022. Your issue & logs was helpful in running down this problem around Apple Silicon and the iOS 15 SDK. Please see the discussion and my observations on the pass/failure table at maplibre/maplibre-gl-native-distribution#7. In my opinion, there is no short term workaround that comes from the MapLibre source. Each app developer using Apple Silicon, whether building from source or consuming the binary from a Swift Package needs to make a change detailed at maplibre/maplibre-gl-native-distribution#7. I've updated your points (in italics) with my observations & comments from that link.
Simulators running iOS 14 & 16 do not have an exception. iOS 15 does.
This is good observation and possibly true. Targeting
Only on iOS Simulators targeting
Rosetta is not a recommended workaround |
@roblabs Thank you for the detailed explanation! Unfortunately for our use case we are unable to disable arm64 architecture (we did in the past) due to side effects in other libraries. From your analysis, iOS 16 Beta seems like a promising solution to avoid the exception (EXC_BAD_ACCESS) and work on simulators with all architecture (despite the warning). I am looking forward to the Meeting Notes for the future of MapLibre. |
Guys, at this point, if you want to experiment, you can try this bundle of binaries: https://sygic-travel-dist.s3.amazonaws.com/ios/libs/Mapbox-5.9.0.zip (which has some extras for our commercial project like support for I'll try to update the proposed Pull request here in Maplibre so that is more usable for possible integration. 👍 |
Advisory Council meeting notes are here: maplibre/maplibre#104 |
In 3 days iOS 16 will be released: https://www.apple.com/ios/ios-16/ Probably that means a new XCode update. According to @roblabs it does not crash with iOS 16 Preview. So my hopes are high that crashes will go away on all simulator versions 🤞🏼 |
It works nicely on the new XCode version. I can life with that now :) |
Is XCode 14 a solution for everyone here? |
I havent yet tested older simulator versions. |
Please help on this issue |
We are dropping OpenGL support on iOS in favor of Metal. Please try out the new pre-release and create a new issue if you run into any problems. |
Hello.
I made a small demo app to verify the crash I have in my production app.
I tested this app with the default style and it works successfully.
We have a custom style which is way heavier than the default style, due the feature of the app.
As soon as we move the viewPort with something like:
MapLibre crashes (note it crashes even non-animated)
Thread 1: EXC_BAD_ACCESS (code=1, address=0x7faa2058fd90)
I would like to know if you could help us out.
We are not able to make the style simpler, but we would like to understand if there is something we can change to avoid the OpenGL Renderer to explode on camera movements.
Some Notes:
Let me know if you want to have the Demo App (it's just a full screen map tbh)
StackTrace
The text was updated successfully, but these errors were encountered: