-
Notifications
You must be signed in to change notification settings - Fork 160
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
MapboxCoreMaps Crashes #2052
Comments
Hi @Ogerets , thank you for the report! |
@persidskiy Hi, I have an update on the issue Could you provide some information in this regard, please? |
I did benchmarks of Also, I am not aware of Mapbox v6 implementation of updating layers, but we didn't have this issue there with the same layers configuration on the main thread. |
@persidskiy Sorry for bothering you, but this issue is blocking us. |
@Ogerets Do you have the style or layer configs that can be used to replicate this? |
Working on the non-main thread is an undefined behavior for SDK.
@Ogerets the try mapView.mapboxMap.setLayerProperty(for: layer.id,
property: "fill-extrusion-height",
value: NSNumber(value: 10)) There are a few caveats:
|
@OdNairy, thank you for the response
The layer is being created locally. I'll gather and send you a sample code of it and the tileset.
Shouldn't moving all expensive mappings to the non-main thread and leaving everything else on the main thread solve the issue? It looks like a quick and easy solution. Could be an alternative to the existing function.
Thank you for the tip, I will look into it |
Sounds reasonable
Another tip over the Objective-C objects – you can use a weird but working solution by converting swift objects (including Mapbox Maps ones) to the Data with JSONEncoder and convert them back with the |
Tested a very crude implementation (see screenshot), and it solves the issue! Looks like a much better and easier approach than Obj-C API. It could be implemented using modern concurrency or some Mapbox internal queue management (saw runtime logs about it). Is there a chance it could be done by the Mapbox Team in the near future? |
Here is our tileset Here's a stripped code we use for the layer which cause the issue The code is more for inspecting than compiling. I apologize we couldn't find time to make a full sample project reproducing the issue |
Environment
Observed behavior and steps to reproduce
Crash from
MapboxCoreMaps
with messagepure-virtual-function-stack-trace.txt
We also see in crashlytics a lot of crashes from
MapboxCoreMaps
with messagesand
with different stack traces. Example:
incorrect-checksum-stack-trace.txt
Expected behavior
no crashes
Notes / preliminary analysis
We migrated from Mapbox v6. At the time, around 10% of users, who updated or downloaded brand new version, experience some of these crashes.
Unfortunately, I was unable to reproduce it on any of my devices.
It looks like all the crashes are about accessing released objects memory somewhere inside
MapboxCoreMaps
I will be grateful for any help here
The text was updated successfully, but these errors were encountered: