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.

Crash when removing nonexistent layer from style #7900

Closed

Description

@jmkiley

Platform: iOS
Version: v3.4.1

How to reproduce:
Attempt to remove a layer that does not exist in the MGLMapView's style.

Expected Behavior:

Either should catch the C++ exception and either rethrow it as an NSException or ignore it.

Actual Behavior:

The app crashes with error:
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: no such layer

Activity

  1. added
    iOS
    on Jan 30, 2017
  2. added
    macOS
    on Jan 30, 2017
  3. added this to the ios-v3.5.0 milestone on Feb 2, 2017
  4. eimantas commented on Feb 6, 2017

    @eimantas
    Contributor

    I have an implementation where the exception is caught with logging a warning and returning nullptr. Would that be acceptable way of handling this situation?

  5. boundsj commented on Feb 7, 2017

    @boundsj
    Contributor

    Hi @eimantas. I think that approach is reasonable. If you want to create a pull request with that change against the master branch we would appreciate it. Thanks!

  6. eimantas commented on Feb 7, 2017

    @eimantas
    Contributor
  7. self-assigned this
    on Feb 21, 2017
  8. boundsj commented on Feb 23, 2017

    @boundsj
    Contributor

    This was fixed by #7962.

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

Metadata

Metadata

Assignees

Labels

crashiOSmacOSruntime styling

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions