Skip to content

C++ chopped routes CSV bug #402

Closed

Description

@yakra

HD @ e21d08b17773ae508b858220d23c6c4b9d830165
UD @ c9da0fa30ee592cad2bd9ee7c323b27c057093af
siteupdate & siteupdateST crash when reading ausvictd.csv. I don't see any problems in ausvictd.csv itself; that's just when/where the problem is observed.

  • noreaster (FreeBSD):

    terminate called after throwing an instance of 'std::length_error'
    what(): basic_string::_M_create

  • lab1 (CentOS):

    terminate called after throwing an instance of 'std::out_of_range'
    what(): basic_string::erase

  • BiggaTomato (Ubuntu):
    nothing, just a crash.

  • Does this persist with newest HighwayData commit? No, not at a72b95ed273df3ae1f6b03313874e72a1e858416.
  • Use git bisect to find when bug...
    • first appears @ f84ce72f1fd40f2382bca3da3aa908dbfa1d1514, where ausvictd.csv gains the blank line at the end.
    • disappears @ 9a9282651558bc156a9a4ba36a302101e2804c0f, where ausvictd.csv loses the blank line at the end.

Activity

  1. yakra commented on Jan 23, 2021

    @yakra
    ContributorAuthor
    // trim DOS newlines & trailing whitespace
    while ( strchr("\r\t ", line.back()) ) line.pop_back();
    if (line.empty()) continue;

    The if needs to come first. Calling back() on an empty string is almost certainly the problem.

  2. added a commit that references this issue on Jan 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions