Skip to content

path details with 'time' returns server error #1216

Closed

Description

@karussell

Example query is this and if you move the second point (the only via point) then it starts to get valid.

2017-11-09 20:12:27,793 [qtp1373419525-173] WARN  org.eclipse.jetty.server.HttpChannel - /route
java.lang.IllegalStateException: PathDetail list time is inconsistent due to entries 61566 [237, 244] vs. 12510 [245, 249]
        at com.graphhopper.util.PathSimplification.simplify(PathSimplification.java:137)
        at com.graphhopper.util.PathMerger.doWork(PathMerger.java:144)
        at com.graphhopper.routing.template.ViaRoutingTemplate.isReady(ViaRoutingTemplate.java:155)
        at com.graphhopper.GraphHopper.calcPaths(GraphHopper.java:1072)

I.e. 245 is one too much or 244 is one too small.

Activity

  1. added this to the 0.10 milestone on Nov 9, 2017
  2. karussell commented on Nov 9, 2017

    @karussell
    MemberAuthor

    The problem is likely in PathMerger and it should be:

    altRsp.addPathDetails(path.calcDetails(requestedPathDetails, pathBuilderFactory, origPoints == 0 ? 0 : origPoints - 1));
    

    Or maybe use the first variable of the previous path detail directly.

    As test (in GraphHopperIT or GraphHopperServletIT) I think we currently only have A-B-C where at B we do a U-turn, but we also need a "straight" case where this error happens. Plus add a case A-B-C-D with path details

  3. karussell commented on Nov 10, 2017

    @karussell
    MemberAuthor

    Hmmh, when we change this then the test GraphHopperIT.testMonacoPathDetails fails at:

    assertEquals(arsp.getPoints().size() - 1, detailList.get(0).getLast());
    

    I think this is because the points of both paths are added to create the fullPoints (the via point is duplicate) but for the path details we do the correct
    lastIndex += edge.fetchWayGeometry(2).size(); instead of
    lastIndex += edge.fetchWayGeometry(3).size(); in PathDetailsFromEdges. @boldtrn do you think this could be the reason?

  4. removed their assignment
    on Nov 11, 2017
  5. boldtrn commented on Nov 13, 2017

    @boldtrn
    Member

    Yes, I think the reason is similar to the issue reported in #1138. I think we lingered too long in #1138, because removing the points from the Instructions was not that easy. I would propose that we fix this issue now by remove the duplicated point for the ViaInstructions.

    Hmmh, when we change this then the test GraphHopperIT.testMonacoPathDetails fails at

    Yes this is expected I think :). I will create a fresh PR for this issue.

  6. karussell commented on Nov 17, 2017

    @karussell
    MemberAuthor

    This is fixed via #1219 thanks @boldtrn !

  7. added 2 commits that reference this issue on Nov 20, 2017
    fd619fa
    1cd0783
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions