Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined behaviour in MLD alternatives #4691

Closed
oxidase opened this issue Nov 16, 2017 · 1 comment · Fixed by #4693
Closed

Undefined behaviour in MLD alternatives #4691

oxidase opened this issue Nov 16, 2017 · 1 comment · Fixed by #4693
Assignees

Comments

@oxidase
Copy link
Contributor

oxidase commented Nov 16, 2017

In alternativePathSearch method weighted_packed_paths is have empty paths if the middle node is also the starting node, so in debug mode there is an assertion and ub in release mode.

The issue can be reproduced with the OSM export https://www.openstreetmap.org/export#map=15/56.9103/14.5320, updated weights from crash.txt file and query curl 'http://localhost:5000/route/v1/driving/14.5303422%2C56.9087067%3B14.52962589263916%2C56.90761947631836.json?geometries=polyline&alternatives=true&steps=true&overview=full&annotations=true'

Values in the file are weights but not rates, so to reproduce the issue the line

const auto weight = distance_in_meters / rate;

must be changed to

        const auto weight = rate;
@oxidase
Copy link
Contributor Author

oxidase commented Nov 20, 2017

The CSV file to reproduce the issue without updater modifications.

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

Successfully merging a pull request may close this issue.

1 participant