Skip to content

Specific alternative route requests leads to IllegalStateException #2850

Closed

Description

@karussell

With master, CH enabled and the following request:

{
  "points": [
    [      13.38886,      52.51703    ],
    [      13.05914,      52.400931    ]
  ],
  "profile": "car",
  "alternative_route.max_paths": 3,
  "algorithm": "alternative_route"
}

I got an exception (seems to be very rare):

[dw-2492 - POST /route?] ERROR i.d.j.e.IllegalStateExceptionMapper - Error handling a request: 649e985b5c09e7a7
java.lang.IllegalStateException: waypoints are not included in points, or waypoint indices are wrong
	at com.graphhopper.util.PathMerger.doWork(PathMerger.java:166)
	at com.graphhopper.routing.Router.routeAlt(Router.java:260)
	at com.graphhopper.routing.Router.route(Router.java:116)
	at com.graphhopper.GraphHopper.route(GraphHopper.java:1254)
	at com.graphhopper.resources.RouteResource.doPost(RouteResource.java:180)

(different points, or profile or max_paths count did not trigger this)

Update: Another request fails with the same error but no alternative route involved and even CH can be disabled and the error still occurs:

{
  "points": [
    [      2.47736588295,      44.4494394989    ],
    [      2.477205,      44.449389    ]
  ],
  "profile": "foot"
}

Activity

  1. hendrik-r commented on Nov 20, 2023

    @hendrik-r

    I was unable to reproduce this bug with the default configuration and https://download.geofabrik.de/europe/germany-latest.osm.pbf as the map bounds.
    Would you mind giving me some pointers that would help me to reproduce it?

  2. karussell commented on Nov 20, 2023

    @karussell
    MemberAuthor

    Likely the problem is that this happens only for larger areas. Maybe something related the CH preparation. We got both errors (with or without alternatives) with the planet pbf only (cannot reproduce locally atm).

  3. easbar commented on May 16, 2024

    @easbar
    Member

    I was able to reproduce the second request in the initial comment both locally and online. But I could not reproduce the first one.

  4. easbar commented on Mar 9, 2025

    @easbar
    Member

    But I could not reproduce the first one.

    Maybe this first error was caused by #3139.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions