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

Harden detached sources/layers #10947

Closed
Closed

Description

@tobrun

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.

Activity

  1. added
    Android
    on Jan 17, 2018
  2. stale commented on Oct 29, 2018

    @stale

    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.

  3. added
    archived
    on Oct 29, 2018
  4. removed
    archived
    on Oct 29, 2018
  5. LukasPaczos commented on Jan 2, 2019

    @LukasPaczos
    Contributor

    Closed by #13484.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Android

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions