Skip to content

Conversation

@woodpeck
Copy link
Contributor

I have recently had osrm-contract abort on a full-planet import with v6.0.0 with the problem described in issue #5440. The modification of the assertion described in that issue solves the problem but it appears it has never made it into the code proper. So here's a PR that does that; after the modification, the osrm-contract step runs normally and produces a functioning routing graph.

@Charmik
Copy link

Charmik commented Oct 27, 2025

@woodpeck I have the same problem - would be good to merge. I see that one test fails - is it normal?

edges.insert(edges.end(), new_edges.begin(), new_end);
auto edges_size = edges.size();
auto new_edges_size = std::distance(new_edges.begin(), new_end);
BOOST_ASSERT(static_cast<int>(edges_size) >= new_edges_size);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here is a better fix here: We want int64_t which will be equivalent to std::ptrdiff_t (the return type of std::distance). The casting to int was probably there originally because the return type of std::distance is signed.

@TheMarex
Copy link
Member

TheMarex commented Jan 9, 2026

Thanks for your contribution! If you have a minute to rebase and fix, I can get this until next week. Otherwise let me know, happy to just cherry-pick into a fresh PR.

@woodpeck
Copy link
Contributor Author

woodpeck commented Jan 9, 2026

TBH I've mentally swapped out OSRM at present so the context switch would take me a while, if you have just looked at this then your memory is fresher than mine & if you could just salvage this into a new PR that would be much appreciated!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants