Skip to content

Fix crash when route starts/ends at manoeuvre relation via node#7339

Merged
TheMarex merged 5 commits intoProject-OSRM:masterfrom
afarber:7287-fix-assertion
Jan 27, 2026
Merged

Fix crash when route starts/ends at manoeuvre relation via node#7339
TheMarex merged 5 commits intoProject-OSRM:masterfrom
afarber:7287-fix-assertion

Conversation

@afarber
Copy link
Copy Markdown
Contributor

@afarber afarber commented Jan 21, 2026

Issue

Fixes #7287

Routes starting or ending exactly at the via node of a type=manoeuvre relation would crash with an assertion failure.

Manoeuvre overrides were applied to depart/arrive steps, setting a turn type on waypoint steps that should always have NoTurn.

  • Skip manoeuvre overrides on waypoint steps (depart/arrive) in post_processing.cpp
  • Keep defensive early return in collapseSegregatedTurnInstructions as defense-in-depth

Tasklist

Requirements / Relations

@TheMarex
Copy link
Copy Markdown
Member

Do you think there is a way to add a regression test for this to the cucumber test suite? While this may be more of a workaround I'm tempted to accept it since I don't think anyone truly understands the guidance code anymore.

@afarber afarber force-pushed the 7287-fix-assertion branch from 5b337d9 to 66ba9ec Compare January 23, 2026 11:06
@afarber afarber changed the title Fix assertion failure in collapseSegregatedTurnInstructions Fix crash when route starts/ends at manoeuvre relation via node Jan 23, 2026
@TheMarex TheMarex merged commit fc5dfe2 into Project-OSRM:master Jan 27, 2026
19 checks passed
@afarber afarber deleted the 7287-fix-assertion branch January 27, 2026 15:04
MarcelloPerathoner pushed a commit to MarcelloPerathoner/osrm-backend that referenced this pull request Feb 24, 2026
…ect-OSRM#7339)

* Fix assertion failure in collapseSegregatedTurnInstructions

* Add test for routes starting/ending at manoeuvre=fork via node

* Skip manoeuvre overrides on depart/arrive waypoint steps

* Improve the log

* Fix the format
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.

Assertion `!hasTurnType(steps.front()) && !hasTurnType(steps.back())' failed.

3 participants