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

Segfault when getRouteSpeeds called before loadCSVs #12

Closed
8 tasks done
danpat opened this issue May 17, 2017 · 1 comment
Closed
8 tasks done

Segfault when getRouteSpeeds called before loadCSVs #12

danpat opened this issue May 17, 2017 · 1 comment

Comments

@danpat
Copy link
Collaborator

danpat commented May 17, 2017

When you use the SpeedLookup module, if you call getRouteSpeeds before you call loadCSVs, a segfault is raised.

After some debugging, this was tracked down to the datamap variable being uninitialized here:

void Execute() override { result_annotations = datamap->getValues(nodeIds); }

We shouldn't segfault here. Instead, the desired behaviour is to return an array containing the correct number of INVALID_SPEED values, similar to what happens when node pairs are not found (see

speeds[segment_index] = INVALID_SPEED;
)

Checklist to fix this:

  • write a JS test that triggers the segfault
  • write a JS test that verifies the correct number of INVALID_SPEED values are returned if loadCSVs hasn't been called but we call getRouteSpeeds
  • update package.json with a new version (0.0.4 perhaps?)
  • create CHANGELOG.md to capture this change
  • merge PR to master
  • tag the release
  • publish binaries by pushing an empty commit with the words [publish binary] in the commit message (I use git commit --allow-empty -m '[publish binary]' && git push).
  • npm publish new version to the npmjs.org repository
@danpat
Copy link
Collaborator Author

danpat commented May 17, 2017

/cc @ghoshkaj

@ghoshkaj ghoshkaj mentioned this issue May 18, 2017
4 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants