opentripplanner / OpenTripPlanner

An open source multi-modal trip planner
http://www.opentripplanner.org
Other
2.21k stars 1.03k forks source link

NullPointerException on startup #4059

Closed roblabla closed 2 years ago

roblabla commented 2 years ago

When starting OpenTripPlanner using a pre-built graph, an NPE is raised immediately, and stops.

Expected behavior

OTP starts properly.

Observed behavior

18:32:12.056 ERROR (OTPMain.java:60) An uncaught error occurred inside OTP: Cannot read the array length because "existing" is null
java.lang.NullPointerException: Cannot read the array length because "existing" is null
    at org.opentripplanner.routing.graph.Vertex.addEdge(Vertex.java:91)
    at org.opentripplanner.routing.graph.Vertex.addIncoming(Vertex.java:147)
    at org.opentripplanner.routing.graph.SerializedGraphObject.reconstructEdgeLists(SerializedGraphObject.java:103)
    at org.opentripplanner.routing.graph.SerializedGraphObject.load(SerializedGraphObject.java:136)
    at org.opentripplanner.routing.graph.SerializedGraphObject.load(SerializedGraphObject.java:74)
    at org.opentripplanner.standalone.OTPMain.startOTPServer(OTPMain.java:123)
    at org.opentripplanner.standalone.OTPMain.main(OTPMain.java:53)

Version of OTP used (exact commit hash or JAR name)

b0c9829e3bfe10daddae72485a09a7f48b0be8ff

Data sets in use (links to GTFS and OSM PBF files)

GTFS: https://data.iledefrance-mobilites.fr/explore/dataset/offre-horaires-tc-gtfs-idfm/files/a925e164271e4bca93433756d6a340d1/download/

OSM PBF: https://dl.roblab.la:4443/paris_france.osm.pbf Paris extract from interline (https://www.interline.io/osm/extracts/)

Command line used to start OTP

java -Xmx8G -jar otp.shaded.jar --port 8801 --load .

Router config and graph build config JSON

None. I use whatever the default is.

Steps to reproduce the problem

java -Xmx8G -jar otp.shaded.jar --build --port 8801 --save .
java -Xmx8G -jar otp.shaded.jar --port 8801 --load .
slvlirnoff commented 2 years ago

@roblabla Could you show the build log output? Is there any 'duplicate vertex label in graph'?

roblabla commented 2 years ago

Yes, there are:

09:58:17.258 ERROR (Graph.java:354) duplicate vertex label in graph (added vertex to graph anyway): <osm:node:4455425696_offboard lat,lng=48.858265100000004,2.2949209>
09:58:17.259 ERROR (Graph.java:354) duplicate vertex label in graph (added vertex to graph anyway): <osm:node:4455425696_onboard lat,lng=48.858265100000004,2.2949209>
09:58:17.259 ERROR (Graph.java:354) duplicate vertex label in graph (added vertex to graph anyway): <osm:node:3134287620_offboard lat,lng=48.858544,2.2944888000000003>
09:58:17.259 ERROR (Graph.java:354) duplicate vertex label in graph (added vertex to graph anyway): <osm:node:3134287620_onboard lat,lng=48.858544,2.2944888000000003>

This is a different invocation w/ a different command line, but we can find that output in the logs: https://gist.github.com/roblabla/c186ea1aaf70f661d1ac8c12dc154185 .

roblabla commented 2 years ago

Here's the log with the --build --save command: https://gist.github.com/roblabla/b6c2064a7f33a89e49edb696bdad7d50

slvlirnoff commented 2 years ago

Yeah it's duplicate of #3966 i'm trying to push a fix today.