Open LukasPaczos opened 6 years ago
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.
@LukasPaczos Can you tell me if this issue is being worked on? I'm a Mapbox enterprise customer, and this bug is currently blocking shipping my application.
This is probably not the right fix, but this commit does seem to fix the crashes: https://github.com/trailbehind/mapbox-gl-native/commit/a6c88145b61c0bc588c73c53d0735ce7667b5878
Thanks for the heads up @JesseCrocker. We'll look into this in next sprint, beginning next week.
Hey @JesseCrocker, thanks for a suggestion. We've considered that before but didn't pull the trigger because we had a general refactor in mind. Since that didn't happen and is not on a backlog, for now, we might implement this workaround.
I'm not sure this is completely fixed. We have a custom geometry source with tiles that take 1-2 seconds to load. We also provide the ability to change the basemap style. If you change them quickly, or occasionally randomly, we are getting a crash with this error:
JNI DETECTED ERROR IN APPLICATION: can't call boolean com.mapbox.mapboxsdk.style.sources.CustomGeometrySource.isCancelled(int, int, int) on null object
in call to CallBooleanMethodV
from void com.mapbox.mapboxsdk.style.sources.CustomGeometrySource.nativeSetTileData(int, int, int, com.mapbox.geojson.FeatureCollection)
Through debugging, we're definitely getting this error after we've changed styles but when there are still tiles being generated.
Should I create a new issue for this?
I am facing the same problem as @bentomas. I already tried the last version Android (9.6.0)
, but the problem still happening. Also I am enterprise user and I am not able to release the app because of this issue. Do you guys have any workaround or any news about how to fix this?
JNI DETECTED ERROR IN APPLICATION: can't call boolean com.mapbox.mapboxsdk.style.sources.CustomGeometrySource.isCancelled(int, int, int) on null object
in call to CallBooleanMethodV
from void com.mapbox.mapboxsdk.style.sources.CustomGeometrySource.nativeSetTileData(int, int, int, com.mapbox.geojson.FeatureCollection)
Refs https://github.com/mapbox/mapbox-gl-native/pull/12517#pullrequestreview-142911111.
The java peer assertions for
CustomGeometrySource::fetchTile
andCustomGeometrySource::cancelTile
can fail when we remove the source on the main thread but the requests are still being processed on worker threads.Temporary workaround - a small delay between removing the layer and removing the source is enough for the worker threads to finish and then we can safely remove the source.
/cc @asheemmamoowala