Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Harden detached sources/layers #10947

Closed
tobrun opened this issue Jan 17, 2018 · 2 comments
Closed

Harden detached sources/layers #10947

tobrun opened this issue Jan 17, 2018 · 2 comments
Labels
Android Mapbox Maps SDK for Android

Comments

@tobrun
Copy link
Member

tobrun commented Jan 17, 2018

A typical source of crashes is when a user loads a new style and tries to call methods on sources/layers that were attached to previous style. I think the issue at hand is twofold:

  • conceptually it's not clear that a style is the owner of the underlying sources/layers and when you call MapboxMap#addLayer() it feels like MapboxMap owns it and it's valid as long as the MapView lives. This API change is ticketed out in Style.java #9338.
  • it crashes the application but doesn't give any clear insight on what went wrong. To close this issue I'm proposing to track the detachment of a source/layer and either throw an exception to prevent core from crashing or ignore any method calls for detached sources/layers.
@stale
Copy link

stale bot commented Oct 29, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the archived Archived because of inactivity label Oct 29, 2018
@LukasPaczos LukasPaczos removed the archived Archived because of inactivity label Oct 29, 2018
@LukasPaczos
Copy link
Contributor

Closed by #13484.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants