Skip to content

NPE for public transit #1311

Closed
Closed

Description

@karussell

See discussion here: https://discuss.graphhopper.com/t/2913

{"vehicle":"pt","weighting":"short_fastest","point":["42.4448765,-76.4808143","42.4301429,-76.5082167"],"points_encoded":false,"pt.arrive_by":false,"ch.disable":true,"pt.walk_speed":3,"pt.earliest_departure_time":"2018-03-15T14:49:15.303Z","pt.profile":true,"pt.limit_solutions":6}

java.lang.NullPointerException\n\tat com.graphhopper.reader.gtfs.Label$1$1.next(Label.java:120)\n\tat 
com.graphhopper.reader.gtfs.Label$1$1.next(Label.java:105)\n\tat 
java.lang.Iterable.forEach(Iterable.java:74)\n\tat 
com.graphhopper.reader.gtfs.TripFromLabel.getTrip(TripFromLabel.java:130)\n\tat 
com.graphhopper.reader.gtfs.GraphHopperGtfs$RequestHandler.parseSolutionsAndAddToResponse(GraphHopperGtfs.java:219)\n\tat 

Activity

  1. added this to the 0.11 milestone on Mar 16, 2018
  2. michaz commented on Mar 16, 2018

    @michaz
    Member

    Argh, that's a tough one that goes all the way down to graph construction.
    I somehow manage to create a graph which has an edge from A to B, and an edge with the same number from B to C. Reproducibly. In GraphHopperStorage.

    Tracing this now.

  3. michaz commented on Mar 17, 2018

    @michaz
    Member

    Apparently, during graph constructing, we cannot add transit after having removed disconnected network components.

    I'm doing that as the last step now instead, which is probably OK in most cases.

    Closing this, as the NPE is definitely gone, and will keep an eye on whether the change matters in unexpected ways.

  4. karussell commented on Mar 18, 2018

    @karussell
    MemberAuthor

    Thanks!

    Apparently, during graph constructing, we cannot add transit after having removed disconnected network components.

    This should be allowed or did you mean that adding transits should not be allowed after this step? If that is the case you could call graphHopperStorage.freeze() to ensure this.

  5. michaz commented on Mar 18, 2018

    @michaz
    Member

    No, this: #1313

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions