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.

change vector tile value comparisons to numeric #166

Closed

Description

@incanus

See #159 (comment) for background. We're currently doing string comparisons which works but isn't optimal.

Activity

  1. added this to the WWDC milestone on May 2, 2014
  2. artemp commented on May 5, 2014

    @artemp
    Contributor

    binary visitation support 40e3372

  3. springmeyer commented on May 5, 2014

    @springmeyer
    Contributor
    1. I think we should open source @artemp's c++11 variant.hpp to a new repo at mapbox/variant.hpp. Then we can track issues, new requirements, and tests in a standalone repo. Sound good @artemp and @kkaefer?
    2. What are the next steps to fully getting this working in llmr-native? @kkaefer - do you have all you need to to plug this in?
  4. kkaefer commented on May 5, 2014

    @kkaefer
    Member

    @springmeyer: No action on your or @artemp's side needed; I just need to add the code and add a test for it.

  5. kkaefer commented on May 8, 2014

    @kkaefer
    Member

    This is done in ee55798.

  6. incanus commented on May 12, 2014

    @incanus
    ContributorAuthor

    I get frequent crashes with this as used in master or as merged into outdoors-style.

    screen shot 2014-05-12 at 12 13 08 pm

  7. springmeyer commented on May 12, 2014

    @springmeyer
    Contributor

    It looks like std::stoll is throwing on invalid input. Wrap in a try/catch in order to see the error...

    try {
      ...
    } catch (std::exception const& ex) {
      std::clog << "exception happened: " << ex.what() << "\n";
      return false;
    }
  8. added a commit that references this issue on May 12, 2014
  9. incanus commented on May 12, 2014

    @incanus
    ContributorAuthor

    I'm not clear if bc29ed5 is a good way to fix this or not (the template use is a bit beyond me). The docs aren't very specific on why std::invalid_argument would get thrown if you pass a valid std::string, only that it can happen (no conversion could be performed). Would appreciate a look over this.

  10. added 3 commits that reference this issue on May 12, 2014
  11. incanus commented on May 13, 2014

    @incanus
    ContributorAuthor

    Ok, I've discovered that:

    1. The above commit is not a good way to fix it and introduces other problems.

    2. What my real root problem is, and why no one else was seeing it, is that I break on exceptions, which is a pretty common Xcode practice:

      screen shot 2014-05-12 at 5 15 45 pm

      However, std::stoll et al. as part of normal behavior throw exceptions. We want to catch these, ignore the exception, but still return something usable.

  12. kkaefer commented on May 13, 2014

    @kkaefer
    Member

    It's a bit unclear why you see exceptions being thrown. They should be caught. While I agree that invalid input shouldn't be an exception (because it's nothing unusual to happen), the STL works this way. Boost's lexical_cast also throws exceptions.

    The only alternative is to use strtol and equivalents rather than stod. Honestly, I'm not sure what the difference is really, except for the differing arguments.

  13. incanus commented on May 13, 2014

    @incanus
    ContributorAuthor

    They should be caught.

    Ok, I had a hunch based on that code but wasn't sure how it was working. Thanks. Do you also see multiple unhanded exceptions if you add the "All Exceptions" breakpoint in Xcode? That just seems really weird to me, and it's going to make any other legitimate use of the breakpoint really difficult.

  14. kkaefer commented on May 14, 2014

    @kkaefer
    Member

    Seems like this is causing a significant performance issue too:

  15. artemp commented on May 14, 2014

    @artemp
    Contributor

    @kkaefer - bottleneck is exception stack unwinding, am I reading ^^ correctly ?

  16. kkaefer commented on May 14, 2014

    @kkaefer
    Member

    yes

  17. incanus commented on May 20, 2014

    @incanus
    ContributorAuthor

    Closing since the original issue is solved in favor of dealing with the exceptions later in #225.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions