Expected behavior
When errors in the input data is encountered OTP should handle it gracefully, not abort the entire import.
Observed behavior
In the the GTFS specification stops.txt a station (location_type=1) requires at least on platform(location_type=0) child:
1: Station. A physical structure or area that contains one or more platforms.
(https://developers.google.com/transit/gtfs/reference/#stopstxt)
This is fine, but when no platform exist for a given staton in a data set, then OTP will abort the entire import with a NullPointerException. A waring would be nice, and then continue with the import.
Version of OTP used (exact commit hash or JAR name)
3cd3dfa (dev-2.x 2019-08-02)
Data sets in use (links to GTFS and OSM PBF files)
se_sl_09072019_stops.zip
This dataset only contains stops - no transit data.
Command line used to start OTP
java -Xmx6g org.opentripplanner.standalone.OTPMain --basePath <basePAth> --build <basePAth>/graphs/se-gtfs --inMemory
Router config and graph build config JSON
No config nessesary
Steps to reproduce the problem
Start OTP
Log
13:59:37.493 INFO (PatternHopFactory.java:1016) Expanded transfer between stations "Alby IP (SE-sl_9021001070006000)" and "Alby IP (SE-sl_9021001070006000)" to 4 transfers between 2 and 2 stops
13:59:37.493 INFO (PatternHopFactory.java:1016) Expanded transfer between stations "Albyvägen (SE-sl_9021001070010000)" and "Albyvägen (SE-sl_9021001070010000)" to 4 transfers between 2 and 2 stops
Exception in thread "main" java.lang.NullPointerException
at java.util.ArrayList.<init>(ArrayList.java:178)
at org.opentripplanner.model.impl.OtpTransitServiceImpl.immutableList(OtpTransitServiceImpl.java:196)
at org.opentripplanner.model.impl.OtpTransitServiceImpl.getStopsForStation(OtpTransitServiceImpl.java:133)
at org.opentripplanner.routing.edgetype.factory.PatternHopFactory.expandTransfer(PatternHopFactory.java:994)
at org.opentripplanner.routing.edgetype.factory.PatternHopFactory.loadTransfers(PatternHopFactory.java:596)
at org.opentripplanner.routing.edgetype.factory.PatternHopFactory.run(PatternHopFactory.java:220)
at org.opentripplanner.graph_builder.module.GtfsModule.buildGraph(GtfsModule.java:116)
at org.opentripplanner.graph_builder.GraphBuilder.run(GraphBuilder.java:100)
at org.opentripplanner.standalone.OTPMain.startOTPServer(OTPMain.java:86)
at org.opentripplanner.standalone.OTPMain.main(OTPMain.java:33)
Expected behavior
When errors in the input data is encountered OTP should handle it gracefully, not abort the entire import.
Observed behavior
In the the GTFS specification stops.txt a station (
location_type=1) requires at least on platform(location_type=0) child:This is fine, but when no platform exist for a given staton in a data set, then OTP will abort the entire import with a
NullPointerException. A waring would be nice, and then continue with the import.Version of OTP used (exact commit hash or JAR name)
3cd3dfa (dev-2.x 2019-08-02)
Data sets in use (links to GTFS and OSM PBF files)
se_sl_09072019_stops.zip
This dataset only contains stops - no transit data.
Command line used to start OTP
java -Xmx6g org.opentripplanner.standalone.OTPMain --basePath <basePAth> --build <basePAth>/graphs/se-gtfs --inMemoryRouter config and graph build config JSON
No config nessesary
Steps to reproduce the problem
Start OTP
Log