diff --git a/.travis.yml b/.travis.yml index e5bbb7ff5..3f0afc63f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ notifications: branches: only: - master - - "5.16" + - "5.16.5-debug.0" # enable building tags - /^v\d+\.\d+(\.\d+)?(-\S*)?$/ diff --git a/package.json b/package.json index bd8f7e623..4b7ae4090 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "osrm", - "version": "5.16.5", + "version": "5.16.5-debug.0", "private": false, "description": "The Open Source Routing Machine is a high performance routing engine written in C++14 designed to run on OpenStreetMap data.", "dependencies": { diff --git a/src/contractor/graph_contractor.cpp b/src/contractor/graph_contractor.cpp index 211b35d56..d6f6caf31 100644 --- a/src/contractor/graph_contractor.cpp +++ b/src/contractor/graph_contractor.cpp @@ -671,6 +671,14 @@ std::vector contractGraph(ContractorGraph &graph, stable_partition(remaining_nodes.begin(), remaining_nodes.end(), [](RemainingNodeData node_data) { return !node_data.is_independent; }); + + if (begin_independent_nodes == remaining_nodes.end()) + { + util::Log() << "No independent node found in " << remaining_nodes.size() + << " remaining nodes"; + break; + } + auto begin_independent_nodes_idx = std::distance(remaining_nodes.begin(), begin_independent_nodes); auto end_independent_nodes_idx = remaining_nodes.size(); @@ -761,7 +769,8 @@ std::vector contractGraph(ContractorGraph &graph, } util::Log() << "Contracted graph has " << graph.GetNumberOfEdges() - << " thus far, with an edge list of (" << (graph.GetNumberOfEdges() * sizeof(ContractorEdge)) << " bytes)"; + << " thus far, with an edge list of (" + << (graph.GetNumberOfEdges() * sizeof(ContractorEdge)) << " bytes)"; /* comment out renumbering and observe if memory spike still happens node_data.Renumber(new_to_old_node_id);